Replies: 2 comments
-
|
This affects Combobox and Listbox as well. |
Beta Was this translation helpful? Give feedback.
-
|
Any update about this? It also breaks my app, as some work needs to be done during onMouseDown before the menu opens, forcing me to pin my project to version 2.2.1. This is clearly a breaking change and should not have been released as a patch or minor change. Has the suggestion to allow specifying whether the menu opens on click or on mousedown been taken into account? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a component in my UI that is both a menu and a draggable handle. Via
mouseDown, I can grab it and move it, but if I insteadclickit, it opens a headlessui-reactMenu.With the changes in @headlessui/react@2.2.2, specifically https://github.com/tailwindlabs/headlessui/pull/3689/files, the described functionality no longer works. The new
mouseDownhandler prevents my drag event handlers from triggering and I can only drag-and-drop when the menu is open.I can get around this by running v2.2.1, but it’d be nice if I could specify whether it opens via 'click' or 'mouseDown' — and this would help other folks in my position too. FWIW, this feels like a breaking change, but IDK the policy being followed for versioning.
Proposal: add a new prop to
MenuButtonthat allows specifying "click" or "mouseDown" as the trigger action. Potentially called something like: "action" or "trigger" or "openVia":Beta Was this translation helpful? Give feedback.
All reactions