discourse/app
Penar Musaraj 34ffc0065a
FIX: Better detect text selection in search input (#21202)
Followup to 17ba00c395.
Fix for https://meta.discourse.org/t/-/261917

This fixes a usability issue where the user couldn't switch to the user
menu when the search menu was visible and the text in the input was
selected.

Explanation: The `click` event is triggered both when clicking and when
selecting some text and clicking. This means that when selecting text in
the search input, at the end of the selection event, a click event was
triggered. And if that click event happened to be outside of the search
menu, then the menu would be dismissed.

Previously, we fixed this by checked if a current text selection was
present. But that results in a small side-effect of not switching to
other menus. This PR switches to setting a flag during `mouseDown` and
then using that flag when evaluating whether to trigger clickOutside or
not.
2023-04-21 14:30:47 -04:00
..
assets FIX: Better detect text selection in search input (#21202) 2023-04-21 14:30:47 -04:00
controllers FIX: Don't render error for bad-sequence (#21187) 2023-04-20 10:26:11 -05:00
helpers UX: Improve login required page (#20847) 2023-03-28 07:09:44 -05:00
jobs PERF: Avoid full `posts` table scans during anonymisation (#21081) 2023-04-12 18:39:10 +01:00
mailers DEV: Replace #pluck_first freedom patch with AR #pick in core (#19893) 2023-02-13 12:39:45 +08:00
models FEATURE: Add new don't feed the trolls feature (#21001) 2023-04-20 15:49:35 +08:00
serializers FEATURE: Add an emoji deny list site setting (#20929) 2023-04-13 15:38:54 +08:00
services FIX: Hashtag subcategory ref incorrect when not highest-ranked type (#21163) 2023-04-20 09:03:55 +10:00
views UX: better digest centering in event of truncation (#21176) 2023-04-20 09:33:50 -04:00