Use mousedown instead of click event to close modals

This commit is contained in:
kolaente 2021-04-18 16:14:46 +02:00
parent e673d965d5
commit af4b1aba70
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B
2 changed files with 2 additions and 2 deletions

View file

@ -1,7 +1,7 @@
<template>
<transition name="modal">
<div class="modal-mask">
<div class="modal-container" @click.self.prevent.stop="$emit('close')">
<div class="modal-container" @mousedown.self.prevent.stop="$emit('close')">
<div class="modal-content" :class="{'has-overflow': overflow, 'is-wide': wide}">
<slot>
<div class="header">

View file

@ -1,6 +1,6 @@
<template>
<div class="modal-mask">
<div @click.self="close()" class="modal-container">
<div @mousedown.self="close()" class="modal-container">
<div class="scrolling-content">
<a @click="close()" class="close">
<icon icon="times"/>