discourse/app
Jeff Wong 86690155b3
FEATURE: prevent accidental canceling when drafting penalties (#9129)
Pop up a confirmation box when there is input. This prevents accidental closing
of the dialog boxes due to clicking outside.

This adds a development hook on modals in the form of a `beforeClose`
function. Modal windows can abort the close if the funtion returns false.

Additionally fixing a few issues with loop and state on the modal popups:

Escape key with bootbox is keyup.
Updating modal to close on keyup as well so escape key is working.
Fixes an issue where pressing esc will loop immediately back to the modal by:
keydown -> bootbox -> keyup -> acts as "cancel", restores modal

Needs a next call to reopenModal otherwise, keyup is handled again by the modal.
Fixes an issue where pressing esc will loop immediately back to the confirm:
esc keyup will be handled and bubble immediately back to the modal.

Additionally, only handle key events when the #discourse-modal is visible.
This resolves issues where escape or enter events were being handled by
a hidden modal window.
2020-03-06 09:36:56 -08:00
..
assets FEATURE: prevent accidental canceling when drafting penalties (#9129) 2020-03-06 09:36:56 -08:00
controllers FEATURE: New route for loading multiple user cards simultaneously (#9078) 2020-03-06 12:23:22 +00:00
helpers FIX: blank popular posts in summary emails due to lightbox images 2020-02-21 16:18:38 -05:00
jobs FIX: Use destroy_all instead of delete_all for shared drafts 2020-03-05 11:13:43 -08:00
mailers FIX: Replace deprecated URI.encode, URI.escape, URI.unescape and URI.unencode (#8528) 2019-12-12 12:49:21 +10:00
models DEV: Reserve webhook event types to be used in plugins (#9110) 2020-03-06 10:16:19 -07:00
serializers SECURITY: Add more restrictions on invite emails 2020-03-05 09:23:21 -05:00
services FIX: ensures destroying a user with security keys doesn't fail (#9042) 2020-02-25 14:07:57 -05:00
views FIX: Sync Ember and non-Ember layouts (#9028) 2020-02-25 15:31:04 +02:00