Feature #92763

Click outside BE modal content doesn't close the modal

Added by Christian Toffolo 3 months ago. Updated about 2 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2020-11-04
Due date:
% Done:

0%

Estimated time:
PHP Version:
Tags:
Complexity:
Sprint Focus:

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.

#1

Updated by Christian Toffolo 3 months ago

  • Tracker changed from Bug to Feature
#2

Updated by Christian Toffolo 3 months ago

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.

#3

Updated by Riccardo De Contardi about 2 months ago

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).

Also available in: Atom PDF