mirror of
https://github.com/wekan/wekan.git
synced 2025-12-22 10:20:14 +01:00
refactor
This commit is contained in:
parent
77ae6c17e7
commit
620bbb3394
1 changed files with 3 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue