You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by dk...@apache.org on 2019/12/27 14:58:23 UTC
[sling-org-apache-sling-app-cms] 02/02: Fixes SLING-8953 - fixing
issue where closing search closes the page properties dialog
This is an automated email from the ASF dual-hosted git repository.
dklco pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
commit 1e7a0d29a52da96a2c7ee9bb4827bffeb3e5b267
Author: Dan Klco <dk...@apache.org>
AuthorDate: Thu Dec 26 22:48:14 2019 -0500
Fixes SLING-8953 - fixing issue where closing search closes the page properties dialog
---
ui/src/main/frontend/js/cms.modal.js | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/ui/src/main/frontend/js/cms.modal.js b/ui/src/main/frontend/js/cms.modal.js
index 987f846..5c19e37 100644
--- a/ui/src/main/frontend/js/cms.modal.js
+++ b/ui/src/main/frontend/js/cms.modal.js
@@ -57,13 +57,15 @@ rava.bind('a.Fetch-Modal', {
},
});
-rava.bind('.modal', {
+rava.bind('.close,.modal-close,.close-modal,.modal-background', {
events: {
- '.close,.modal-close,.close-modal,.modal-background': {
- click(event) {
- event.preventDefault();
- this.remove();
- },
+ click(evt) {
+ const modal = this.closest('.modal');
+ if (modal) {
+ evt.preventDefault();
+ evt.stopPropagation();
+ modal.remove();
+ }
},
},
});