discourse/app/assets/stylesheets
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
..
common UX: Only close modal for full 'click' events outside (#23566) 2023-09-25 14:23:59 +01:00
desktop A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
mobile A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
vendor Revert "DEV: FloatKit (#23541)" (#23549) 2023-09-12 13:55:12 -04:00
admin_rtl.scss FEATURE: Serve RTL versions of admin and plugins CSS bundles for RTL locales (#21876) 2023-06-01 05:27:11 +03:00
admin.scss
color_definitions.scss Revert "DEV: FloatKit (#23541)" (#23549) 2023-09-12 13:55:12 -04:00
common.scss Revert "DEV: FloatKit (#23541)" (#23549) 2023-09-12 13:55:12 -04:00
desktop_rtl.scss
desktop.scss DEV: Added support for custom site setting 'emoji_list' (#12414) 2021-04-07 15:32:05 +02:00
embed.scss UX: highlight vars updates (#20346) 2023-02-21 10:15:49 +01:00
ember_cli.scss DEV: Require Ember CLI to be used in development mode (#12738) 2021-04-29 14:13:36 -04:00
mobile_rtl.scss
mobile.scss DEV: Refactor font and category background importers (#12312) 2021-03-10 11:05:56 -05:00
publish.scss UX: update and consolodate published page styles (#18792) 2022-11-01 14:31:39 -04:00
qunit-custom.scss DEV: Add dark theme support to QUnit (#19014) 2022-11-17 18:44:44 +01:00
qunit.scss DEV: Add dark theme support to QUnit (#19014) 2022-11-17 18:44:44 +01:00
wcag.scss UX: Differentiate focus state from hover state (#22985) 2023-08-07 16:46:10 -04:00
wizard_rtl.scss FEATURE: Serve RTL versions of admin and plugins CSS bundles for RTL locales (#21876) 2023-06-01 05:27:11 +03:00
wizard.scss A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00