Feature #92763
closed
Click outside BE modal content doesn't close the modal
Added by Ian Solo about 4 years ago.
Updated about 2 years ago.
Description
A nice modal usability feature could be to allow the BE user to close the modal clicking outside of its content.
This behavior should be triggered with a modal configuration option.
- Tracker changed from Bug to Feature
Actually I could work only on the minified version of TYPO3 BE modal.js.
To close the modal with a click outside the modal content I added:
r.on("click",function(t){$(t.target).hasClass("modal-dialog")&&r.modal("hide")})
to 'shown.bs.modal' event.
Practically:
after the modal is shown, when user clicks on modal, if the target of the click is '.modal-dialog' (so everything outside '.modal-content') then hide the modal.
Am I wrong or the "close on click outside" is the standard behavior of Bootstrap's modals? My guess is that it has been removed on purpose (Mind, mine is just a guess).
- Sprint Focus set to On Location Sprint
I tested this on main (34e8e51
) and all of the modals I tested (content elements, link browser, etc.) closed when clicking outside the modal content.
Is there are specific one this didn't work for or was it any modal?
If latter was the case when this was created, this is already working now.
- Sprint Focus deleted (
On Location Sprint)
- Status changed from New to Closed
This feature has been implemented in TYPO3 11 so I close it.
Also available in: Atom
PDF