modal.js: Really only close the modal if the user clicks outside of it
The click event fires only after the mouse button is released, which may happen on the outside, after the user tried to select something and overrun accidentally. A close is then not desired as the user may loose input. The mousedown event fires right when the button is pressed and suffices on the outside of the modal.
This commit is contained in:
parent
7790a72efa
commit
07251e6d5e
public/js/icinga/behavior
|
@ -22,7 +22,7 @@
|
|||
this.on('change', '#modal form select.autosubmit', this.onFormAutoSubmit, this);
|
||||
this.on('change', '#modal form input.autosubmit', this.onFormAutoSubmit, this);
|
||||
this.on('click', '[data-icinga-modal]', this.onModalToggleClick, this);
|
||||
this.on('click', '#layout > #modal', this.onModalLeave, this);
|
||||
this.on('mousedown', '#layout > #modal', this.onModalLeave, this);
|
||||
this.on('click', '.modal-header > button', this.onModalClose, this);
|
||||
this.on('keydown', this.onKeyDown, this);
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue