diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-01-04 12:18:24 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-01-04 12:18:24 +0200 |
commit | 4114d089619fcf28c2f2ffb66957fdd25181747f (patch) | |
tree | f79983c607671f3634295855cae6acfd75583370 /client/lib/popup.js | |
parent | 98917523fced8136dcc803f77800fa038c8294d0 (diff) | |
parent | ff65b37336689afa87f1e1dcf0cea8a5cd60311f (diff) | |
download | wekan-4114d089619fcf28c2f2ffb66957fdd25181747f.tar.gz wekan-4114d089619fcf28c2f2ffb66957fdd25181747f.tar.bz2 wekan-4114d089619fcf28c2f2ffb66957fdd25181747f.zip |
Merge branch 'edge' into meteor-1.8
Diffstat (limited to 'client/lib/popup.js')
-rw-r--r-- | client/lib/popup.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/client/lib/popup.js b/client/lib/popup.js index 516ce849..5b640f50 100644 --- a/client/lib/popup.js +++ b/client/lib/popup.js @@ -27,11 +27,9 @@ window.Popup = new class { open(name) { const self = this; const popupName = `${name}Popup`; - function clickFromPopup(evt) { return $(evt.target).closest('.js-pop-over').length !== 0; } - return function(evt) { // If a popup is already opened, clicking again on the opener element // should close it -- and interrupt the current `open` function. @@ -57,7 +55,6 @@ window.Popup = new class { self._stack = []; openerElement = evt.currentTarget; } - $(openerElement).addClass('is-active'); evt.preventDefault(); @@ -139,6 +136,7 @@ window.Popup = new class { const openerElement = this._getTopStack().openerElement; $(openerElement).removeClass('is-active'); + this._stack = []; } } @@ -200,7 +198,7 @@ escapeActions.forEach((actionName) => { () => Popup[actionName](), () => Popup.isOpen(), { - noClickEscapeOn: '.js-pop-over', + noClickEscapeOn: '.js-pop-over,.js-open-card-title-popup', enabledOnClick: actionName === 'close', } ); |