discourse/app
David Taylor 88ec2320dc
UX: Only close modal for full 'click' events outside (#23566)
Previously we were using 'mouseup', which meant that if you started the click inside, and then dragged to outside the modal, it would still close. This kind of dragging action is common when selecting text, and having it close the modal can be very frustrating.

Simply switching to a 'click' listener doesn't totally solve the problem, because when a click event involves dragging from one element to another, the browser will fire the event on "the most specific ancestor element that contained both elements". For modals, the most specific common ancestor was still the `modal-middle-container`, which would cause the modal to close.

Therefore, this commit sets the modal containers to have `pointer-events: none`, and sets up the click listener on the `.modal-backdrop` element, which is **adjacent** to the modal in the DOM. That means that click events fired on any ancestors of the modal will not accidentally trigger closure.
2023-09-25 14:23:59 +01:00
..
assets UX: Only close modal for full 'click' events outside (#23566) 2023-09-25 14:23:59 +01:00
controllers FIX: Return 403 instead of redirect on username routes when hiding profiles (#23545) 2023-09-13 14:33:47 -05:00
helpers DEV: Switch to using standard ember-cli test bundle (#23337) 2023-09-04 17:09:55 +01:00
jobs FEATURE: site settings to revoke api keys older than a number of days (#23595) 2023-09-15 16:31:29 -03:00
mailers FIX: Order tags shown in email subject by topics count and name (#22586) 2023-07-13 15:39:58 +08:00
models DEV: Remove deprecated PostAction.act method (#23641) 2023-09-24 08:16:32 +01:00
serializers FIX: Don't mix up action labels between different reviewables (#23365) 2023-09-06 10:57:30 +08:00
services FIX: Everyone should be aware a cached summary is outdated. (#23438) 2023-09-06 12:09:21 -03:00
views DEV: Stop building test assets in production under Embroider (#23388) 2023-09-11 09:12:37 +01:00