I am sure I am not that only one who this scenario has occurred to:
You start filling some form in a modal window (could be the content of a page when using fof/pages) and then you accidentally close the modal by clicking outside of it, and all content is lost into Nirvana... This even happens when you select text in a textarea and trigger the "mouse-up" event outside of the modal.
So as this can be very frustrating, I would like to improve the UX and prevent this from happening.
Ideas on how to approach this are very welcome.
This will most certainly be something that can be fixed in core. But as for now all the instances are on beta.13 (and will stay there for a good while...) I will have to find a fix that can be done with an extension.
Maybe there should be a shouldClose()
call in the close()
method of ModalManager
(or ModalManagerState
in b14), and if it returns false
interrupt the closing.
What do you think?