mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 07:31:13 +08:00

Stopping propagation when a `DMenu`'s trigger is clicked could prevent another floating UI element, e.g. the search menu in the header, from closing when clicking outside of it. We call `stopPropagation` on the event to allow more clicks within a `DMenu`'s trigger without it getting closed, so we shouldn't stop the event propagation if the `DMenu` hasn't been expanded yet.