summaryrefslogtreecommitdiffstats
path: root/client/lib
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2018-06-26 01:35:09 +0300
committerLauri Ojansivu <x@xet7.org>2018-06-26 01:35:09 +0300
commitf629a7b3f7e614240fa6e703507a43540467ebbc (patch)
tree95f65cefa6f8320397868226144e128f9e66f2fa /client/lib
parent03921a969a27925712ba0a7746e9dcf19028c968 (diff)
parent620bbb3394bdfabeb63eb7a43f822b37da7ceab5 (diff)
downloadwekan-f629a7b3f7e614240fa6e703507a43540467ebbc.tar.gz
wekan-f629a7b3f7e614240fa6e703507a43540467ebbc.tar.bz2
wekan-f629a7b3f7e614240fa6e703507a43540467ebbc.zip
Merge branch 'patch-6' of https://github.com/pravdomil/wekan into pravdomil-patch-6
Diffstat (limited to 'client/lib')
-rw-r--r--client/lib/inlinedform.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/client/lib/inlinedform.js b/client/lib/inlinedform.js
index 56768a13..272d79f7 100644
--- a/client/lib/inlinedform.js
+++ b/client/lib/inlinedform.js
@@ -75,6 +75,16 @@ InlinedForm = BlazeComponent.extendComponent({
EscapeActions.register('inlinedForm',
() => { currentlyOpenedForm.get().close(); },
() => { return currentlyOpenedForm.get() !== null; }, {
- noClickEscapeOn: '.js-inlined-form',
+ enabledOnClick: false
}
);
+
+// submit on click outside
+document.addEventListener("click", function(evt) {
+ const openedForm = currentlyOpenedForm.get()
+ const isClickOutside = $(evt.target).closest(".js-inlined-form").length === 0;
+ if (openedForm && isClickOutside) {
+ $('.js-inlined-form button[type=submit]').click();
+ openedForm.close();
+ }
+}, true);