The close/flag dialog should only be dismissed when explicitly clicking on the "close" UI element (the little "x" on the upper right)
Most of the time accidental dismissal of the dialog is harmless (the harm is at most re-navigating to the appropriate flag/close option)
But it can be very frustrating when it happens when one is on the process of trying to write a detailed custom flag. All the links and witticisms disappear in a puff of figurative smoke because an absurd misclick, which may even happen because one is trying to gather more data to add to the flag message.
I see very little benefit for this dialog to be dismissed to easily, particularly when the opportunity exists to waste a flagger's time in the process, and a clear, explicit UI alternative is already provided.
Alternatives like:
- Persisting the written text in local-storage
- Prompt the user for confirmation if there is already text written, as suggested here on this very old, very closely related feature-request.1
Would also be acceptable. I just figure that removing the magic dialog dismissal provides the same benefits for less work. But anything that prevents this kind of thing would be welcome in any case.
1: Comments on that question already mention this applies to other dialogs, and that the simpler solution is the one I naively propose here: