mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
🐛 Fixed closing modals in admin UI when releasing mouse outside modal
no issue When selecting text, and releasing your mouse outside the modal, the modal would close.
This commit is contained in:
parent
5658f4b627
commit
5949d6a8d4
1 changed files with 2 additions and 2 deletions
|
@ -36,7 +36,7 @@ export default class ModalsService extends EPMModalsService {
|
|||
addEventHandlers() {
|
||||
if (!this.backdropClickHandler) {
|
||||
this.backdropClickHandler = bind(this, this.handleBackdropClick);
|
||||
document.body.addEventListener('click', this.backdropClickHandler, {capture: true, passive: false});
|
||||
document.body.addEventListener('mousedown', this.backdropClickHandler, {capture: true, passive: false});
|
||||
}
|
||||
|
||||
if (!this.escapeKeyHandler) {
|
||||
|
@ -46,7 +46,7 @@ export default class ModalsService extends EPMModalsService {
|
|||
}
|
||||
|
||||
removeEventHandlers() {
|
||||
document.body.removeEventListener('click', this.backdropClickHandler, {capture: true, passive: false});
|
||||
document.body.removeEventListener('mousedown', this.backdropClickHandler, {capture: true, passive: false});
|
||||
this.backdropClickHandler = null;
|
||||
|
||||
document.removeEventListener('keydown', this.escapeKeyHandler, {capture: true, passive: false});
|
||||
|
|
Loading…
Add table
Reference in a new issue