Commit Graph

7 Commits

Author SHA1 Message Date
Johannes Meyer e704309c41 modal.js: Trigger `close-modal` when.. closing a modal 2021-05-17 13:20:43 +02:00
Johannes Meyer 07251e6d5e 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.
2021-03-09 08:52:10 +01:00
Johannes Meyer 7790a72efa js: Only close a modal if an ESC press is not handled otherwise 2021-03-09 08:52:10 +01:00
Johannes Meyer 57b4a31bc3 js: Don't navigate right when opening a modal
Isn't the prettiest fix. I would have liked to completely
remove the target preparation from `getLinkTargetFor`.
But this is the easiest fix since it's only for modals
that preparation is not desired. It's also the most
compatible change.
2021-02-17 12:51:26 +01:00
Johannes Meyer 74a9a8edf0 modal.js: Request compact content with `showCompact` 2020-06-04 08:50:41 +02:00
Johannes Meyer db69f23c20 modal.js: Don't push form submits to the history 2020-01-15 08:41:34 +01:00
Johannes Meyer a13d2b1e48 js: Introduce behavior modal.js 2019-11-04 12:46:30 +01:00