Ignore clicks on close button when a JS modal dialog is showing.
Keep some edit commands enabled so that the user can use their shortcuts in a text field inside a JS dialog.