diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-06-26 01:35:09 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-06-26 01:35:09 +0300 |
commit | f629a7b3f7e614240fa6e703507a43540467ebbc (patch) | |
tree | 95f65cefa6f8320397868226144e128f9e66f2fa /client/lib | |
parent | 03921a969a27925712ba0a7746e9dcf19028c968 (diff) | |
parent | 620bbb3394bdfabeb63eb7a43f822b37da7ceab5 (diff) | |
download | wekan-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.js | 12 |
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); |