Project

General

Profile

Actions

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.

Status:
Closed
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.

Actions #1

Updated by Ian Solo about 4 years ago

  • Tracker changed from Bug to Feature
Actions #2

Updated by Ian Solo about 4 years 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.

Actions #3

Updated by Riccardo De Contardi almost 4 years 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).

Actions #4

Updated by Benni Mack over 2 years ago

  • Sprint Focus set to On Location Sprint
Actions #5

Updated by Andreas Nedbal over 2 years ago

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.

Actions #6

Updated by Oliver Hader about 2 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #7

Updated by Ian Solo about 2 years ago

  • Status changed from New to Closed

This feature has been implemented in TYPO3 11 so I close it.

Actions

Also available in: Atom PDF