discourse/app/assets
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
..
images FIX: fallback to default push notification icon if none exists (#16961) 2022-06-01 12:00:05 +10:00
javascripts FIX: Better detect text selection in search input (#21202) 2023-04-21 14:30:47 -04:00
stylesheets UX: fix time pickers input width on mobile (#21170) 2023-04-19 10:08:24 -05:00