discourse/app/assets/stylesheets/common/base
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
..
_index.scss Revert "DEV: FloatKit (#23541)" (#23549) 2023-09-12 13:55:12 -04:00
_topic-list.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00
about.scss
activation.scss DEV: Use more css vars (#18561) 2022-10-12 16:05:42 +02:00
alert.scss UX: highlight vars updates (#20346) 2023-02-21 10:15:49 +01:00
bbcode.scss
cat_reorder.scss UX: Increase width & center category reorder input (#10928) 2020-10-15 14:42:42 +11:00
category-list.scss FIX: add category colors back to categories pages (#21977) 2023-06-07 12:57:10 -04:00
code_highlighting.scss UX: update hljs-builtin-name highlight (#16859) 2022-05-18 15:55:40 +02:00
colorpicker.scss FEATURE: Use native color-picker (#15748) 2022-02-01 11:18:13 -03:00
compose.scss UX: fix tag chooser width when there are multiple tags (#23432) 2023-09-06 16:01:03 +05:30
composer-user-selector.scss DEV: Use css var font sizes (#18518) 2022-10-12 15:31:59 +02:00
crawler_layout.scss UX: Style edits (#19927) 2023-02-15 11:02:16 -06:00
d-icon.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
d-image-grid.scss UX: Better alignment for experimental grids (#22066) 2023-06-13 09:25:46 -04:00
d-popover.scss Revert "DEV: FloatKit (#23541)" (#23549) 2023-09-12 13:55:12 -04:00
dialog.scss A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
directory.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00
discourse.scss A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
edit-category.scss DEV: Apply form template to categories (#20337) 2023-02-23 11:18:14 -08:00
edit-topic-timer-modal.scss DEV: Convert edit-topic-timer modal to component-based API (#23252) 2023-08-25 12:17:34 -05:00
ember-select.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
emoji.scss UX: improve emoji alignment for text (#19815) 2023-01-30 14:07:08 +01:00
empty-state.scss DEV: Use css var font sizes (#18518) 2022-10-12 15:31:59 +02:00
exception.scss DEV: Use css var font sizes (#18518) 2022-10-12 15:31:59 +02:00
explain-reviewable.scss DEV: Prettify negative numbers in reviewable score explanation (#23642) 2023-09-25 10:34:51 +01:00
faqs.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00
group.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00
groups.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00
header.scss A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
history.scss DEV: Convert theme-change modal to component-based API (#22964) 2023-08-03 15:01:40 -05:00
lightbox.scss UX: remove rounded border on hover lightbox (#22080) 2023-06-13 13:31:28 +02:00
login.scss DEV: Don't render header on invites page (#22138) 2023-06-16 09:42:00 +08:00
magnific-popup.scss UX: force long filenames to wrap in lightbox (#22091) 2023-06-13 13:34:14 -04:00
menu-panel.scss FIX: Adjust border-radius in multiple locations (#23278) 2023-08-25 16:09:18 -05:00
modal.scss UX: Only close modal for full 'click' events outside (#23566) 2023-09-25 14:23:59 +01:00
new-user.scss DEV: Refactor GroupNotificationsButton into userPrivateMessages.group route (#21930) 2023-06-07 06:22:50 +08:00
not-found.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00
onebox.scss A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
personal-message.scss A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
popup-menu.scss REFACTOR: move shadow vars to css custom props (#22094) 2023-06-13 16:38:31 -04:00
redirection.scss DEV: Use more css vars (#18561) 2022-10-12 16:05:42 +02:00
request_access.scss DEV: Use css var font sizes (#18518) 2022-10-12 15:31:59 +02:00
request-group-membership-form.scss DEV: Convert request-group-membership-form to new modal api (#23600) 2023-09-15 00:39:52 +02:00
reviewables.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00
rtl.scss FEATURE: Serve RTL versions of admin and plugins CSS bundles for RTL locales (#21876) 2023-06-01 05:27:11 +03:00
search-menu.scss A11Y: add focus state for advanced search button (#23573) 2023-09-13 17:24:36 -04:00
search.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00
share_link.scss UX: Move post date under title in share-modal (#16455) 2022-04-27 16:36:08 +03:00
shared-drafts.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
sidebar-custom-section.scss UX: visual indicator for reorder sidebar links mode (#22379) 2023-07-04 09:56:52 +10:00
sidebar-footer.scss FIX: restore sidebar footer background (#21956) 2023-06-06 14:46:08 -04:00
sidebar-more-section-links.scss UX: fix "More" menu at small tablet width (#23616) 2023-09-15 17:21:24 -04:00
sidebar-section-link.scss UX: Remove section heading for community section (#22405) 2023-07-11 09:40:37 +08:00
sidebar-section.scss Revert "DEV: FloatKit (#23541)" (#23549) 2023-09-12 13:55:12 -04:00
sidebar.scss Revert "DEV: FloatKit (#23541)" (#23549) 2023-09-12 13:55:12 -04:00
static-login.scss REFACTOR: move shadow vars to css custom props (#22094) 2023-06-13 16:38:31 -04:00
tagging.scss UX: creates a vertical space between the title and the back link (#23558) 2023-09-15 12:16:23 +10:00
tooltip.scss REFACTOR: move shadow vars to css custom props (#22094) 2023-06-13 16:38:31 -04:00
topic-admin-menu.scss A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
topic-post.scss A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
topic-summary.scss A11Y: disable non-essential CSS animations for reduced-motion users (#23571) 2023-09-14 17:31:43 -04:00
topic.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00
upload.scss FEATURE: automatic dark mode (#10341) 2020-08-03 22:57:10 -04:00
user-badges.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00
user-tips.scss Revert "DEV: FloatKit (#23541)" (#23549) 2023-09-12 13:55:12 -04:00
user.scss DEV: common CSS property for content backgrounds (#23467) 2023-09-08 12:07:04 -04:00