Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: icon toggles saerch menu display on click (discourse#20950)
Using the `mouseDownOutside` event was problematic here because two events were being triggered consecutively: `mouseDown` would toggle the menu off and `click` would then toggle it back on. This switches the logic to use `clickOutside` again, but with two changes: - it limits the action to the `search-menu` key (so that theme component overrides can do their own handling) - it does not trigger the event when there is an active text selection (this was the original reason for switching to `mouseDownOutside`, see discourse#14788)
- Loading branch information