Fixed remodal issue triggering close when selecting a dropdown item ending outside of scope (fixes #1682)

This commit is contained in:
Djamil Legato
2020-11-16 22:57:56 -08:00
parent 39796e8136
commit 1351dd8689
2 changed files with 4 additions and 1 deletions

View File

@@ -13,6 +13,7 @@
* Fixed missing special groups `authors` and `defaults` for pages * Fixed missing special groups `authors` and `defaults` for pages
* Fixed Page Move action and selection highlight in Parents selector modal [flex-objects#80](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/80) * Fixed Page Move action and selection highlight in Parents selector modal [flex-objects#80](https://github.com/trilbymedia/grav-plugin-flex-objects/issues/80)
* Fixed folder auto-naming in Add Module [#1937](https://github.com/getgrav/grav-plugin-admin/issues/1937) * Fixed folder auto-naming in Add Module [#1937](https://github.com/getgrav/grav-plugin-admin/issues/1937)
* Fixed remodal issue triggering close when selecting a dropdown item ending outside of scope [#1682](https://github.com/getgrav/grav-plugin-admin/issues/1682)
# v1.10.0-rc.17 # v1.10.0-rc.17
## 10/07/2020 ## 10/07/2020

View File

@@ -589,8 +589,10 @@ import $ from 'jquery';
// Add the event listener for the overlay // Add the event listener for the overlay
remodal.$wrapper.on('click.' + NAMESPACE, function(e) { remodal.$wrapper.on('click.' + NAMESPACE, function(e) {
var $target = $(e.target); var $target = $(e.target);
var isWrapper = $target.hasClass(namespacify('wrapper'));
var isWithin = $target.closest('.' + namespacify('is', STATES.OPENED)).length;
if (!$target.hasClass(namespacify('wrapper'))) { if (!isWrapper && isWithin) {
return; return;
} }