summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpravdomil <pravdomil.toman@gmail.com>2018-06-19 16:41:27 +0200
committerpravdomil <pravdomil.toman@gmail.com>2018-06-19 16:43:02 +0200
commit620bbb3394bdfabeb63eb7a43f822b37da7ceab5 (patch)
tree28bd2bb453a775883b7e952dc1067d45d0efc4ba
parent77ae6c17e718669edcae8898792e20be3db18053 (diff)
downloadwekan-620bbb3394bdfabeb63eb7a43f822b37da7ceab5.tar.gz
wekan-620bbb3394bdfabeb63eb7a43f822b37da7ceab5.tar.bz2
wekan-620bbb3394bdfabeb63eb7a43f822b37da7ceab5.zip
refactor
-rw-r--r--client/lib/inlinedform.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/lib/inlinedform.js b/client/lib/inlinedform.js
index c652c646..272d79f7 100644
--- a/client/lib/inlinedform.js
+++ b/client/lib/inlinedform.js
@@ -81,10 +81,10 @@ EscapeActions.register('inlinedForm',
// submit on click outside
document.addEventListener("click", function(evt) {
- const formIsOpen = currentlyOpenedForm.get() && currentlyOpenedForm.get().isOpen.get();
+ const openedForm = currentlyOpenedForm.get()
const isClickOutside = $(evt.target).closest(".js-inlined-form").length === 0;
- if (formIsOpen && isClickOutside) {
+ if (openedForm && isClickOutside) {
$('.js-inlined-form button[type=submit]').click();
- currentlyOpenedForm.get().close();
+ openedForm.close();
}
}, true);