diff options
author | Lauri Ojansivu <x@xet7.org> | 2018-06-26 01:42:02 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2018-06-26 01:42:02 +0300 |
commit | c372ea02f7b3667b8fe45fbd761ac23d3a1bbcc4 (patch) | |
tree | d7833a8dcba384949f2eb6a9a0c6f9ed200fcfce /client | |
parent | 03921a969a27925712ba0a7746e9dcf19028c968 (diff) | |
parent | daa95c582e9f11e15bb67389de5a97ded45dbc42 (diff) | |
download | wekan-c372ea02f7b3667b8fe45fbd761ac23d3a1bbcc4.tar.gz wekan-c372ea02f7b3667b8fe45fbd761ac23d3a1bbcc4.tar.bz2 wekan-c372ea02f7b3667b8fe45fbd761ac23d3a1bbcc4.zip |
Merge branch 'pravdomil-patch-6' into devel
Diffstat (limited to 'client')
-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..e5e4d4ed 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); |