Task #102329
openModal "Remove Temporary Assets" can't be closed with ESC when assets were removed
0%
Description
Visit /typo3/module/tools/maintenance and click on "scan temporary files" to open the modal "Remove Temporary Assets"
Here click a button to remove some assets.
A flash message pops up and the dialog can not be closed with ESC on keyboard.
You have to wait until the Flash message is removed to close the modal with ESC.
Side topic: It would be very nice, when the modal can be closed with a mouse click outside the modal. Currently the user is forced to use ESC or to navigate to the small 'x' in the top right corner.
Updated by Marcin Sągol about 1 year ago
I'm not sure if clicking outside a modal should trigger its closing action.
As you can see, all modals in the Maintenance module function this way.
Given that the Maintenance module is more important and has a higher impact on the website than modals in other non-admin modules, I think maintaining the current behavior might be better.
This approach prevents accidentally closing the modal by clicking outside of it. What do you think?
Updated by Christoph Lehmann about 1 year ago
I would ignore "accidently clicking". Given you support it... where to start, where to end?
Lets focus on keyboard navigation. It would help, when new flash messages dont get focused automatically, eg the focus stay on the modal. What do you think?
Updated by Oliver Bartsch about 1 year ago
I just checked the behaviour. It's actually not the flash message, which prevents closing using ESC key. The focus remains on the clicked button.
Updated by Riccardo De Contardi 4 months ago
The issue is still valid for version 13
Test procedure
1) Admin tools > Manteinance > Card "Remove Temporary Assets"
2) Click on "scan temporary files..." > the modal window opens
(If you press the "Esc" button now the modal window closes)
3) Click on one buttons like "Delete x files in typo3temp/assets/css"
4) A flash message appear on the bottom right corner; it disappears after a short time
- If you press the esc button the modal window does not close
- If you click again somewhere inside the modal window and press esc, now it works (the window closes itself)
Updated by Riccardo De Contardi 4 months ago
- Complexity set to easy
- Sprint Focus set to On Location Sprint
Updated by Sébastien Delcroix about 2 months ago
I digged and found that the issue occur for all "install" module modals that have buttons triggering an ajax request (that replaces the body content).
In that case, the modal loses the focus.
Is it a real problem ? In the actual state, it "prevents" closing the modal while the request is in process and before the content is returned and rendered.