-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
the submenu items onclick are not triggered after click the submenu itself #3010
Comments
Here's the workaround
a proper fix might be to append the above |
I have this problem with @blueprintjs/core 3.7.0. gasolin's workaround makes the submenu work, but the parent menu does not close when clicking an entry in the submenu. |
@karlb yes that's exactly what |
another way to make submenu click work is use click mode instead of hover mode
The menu/sub menu won't close automatically either with above setting (no captureDismiss: true) @giladgray Is there a way to trigger an event to dismiss those popover in react |
@gasolin have you read this docs section carefully? https://blueprintjs.com/docs/#core/components/popover.closing-on-click |
@giladgray yes, I inspected the sub menuitems and all items already equip with |
@gasolin try adding i'm considering changing the |
Hitting the same issue. Expected: Actual: I tried all the workarounds in this issue but all leave the menu open when clicked. |
@pcdv dude. slap an |
@giladgray thanks, I had forgotten to remove an experimental e.stopPropagation() that caused the menu to remain open. |
I've dug a little deeper into this, and I think @gasolin is actually onto something bigger. What I've found is that when a Setting This behavior is not immediately visible, because 1) in the majority of cases that the target gets focus, it is also being hovered, so the popover's open condition is still being met, reopening it without delay; and (more interestingly) 2) if a popover's target is clicked, causing the document's next mousedown to close it, and that mousedown event happens to be on an element inside the popover's contents (e.g. a This bug is actually reproducible in the docs examples, although it's hard to even notice unless you're looking for it.
I also think this might be behind #2796 (onClick will fire if the user clicks quickly enough, but if too much time elapses between the mousedown and the mouseup of the click, then the event won't fire, resulting in behavior that might appear to be nondeterministic) I'm screwing around with some possible fixes. |
I'm experiencing this too, and it makes my app feel really flakey. @giladgray I feel like the "Status: needs more info" is no longer applicable, as you can see this behavior in the docs today: If you click on "Settings" before you click on "remove application" then "remove application"'s click does not dismiss the menu - this is indication that the actual "remove application" menu item is not firing at all! |
and the |
actually, pinging @adidahiya instead.. |
Also seeing this issue as well. Let us know if we can help in any way @adidahiya 👍 |
Environment
Steps to reproduce
The normal usage is hover on submenu and click sub item 1 to trigger
sub item 1 onClick
as above.onClick
of submenu itself is triggeredActual behavior
sub item 1/sub item 2 onclick is not triggered after click the submenu itself
Expected behavior
sub item 1/sub item 2 onclick still triggered normally after click the submenu itself
might related #2796
The text was updated successfully, but these errors were encountered: