mdc-simple-menu firing "cancel" event when setting "open"?
See original GitHub issueWhat MDC-Web Version are you using?
`0.5.0
What browser(s) is this bug affecting?
Firefox 52.0, Chrome
What OS are you using?
Linux w/ kernel 4.9.11-1
What are the steps to reproduce the bug?
- Click on the button that says “click me”.
- Click on the button again. Notice in the console that the “cancel” event will continue to fire, but the menu will be hidden.
This isn’t exactly what’s happening to be but it’s related.
http://codepen.io/anon/pen/QpGOMp
What is the expected behavior?
Ideally clicking the button again wouldn’t do anything, but the switch should toggle (and it does).
What is the actual behavior?
Clicking on the button again closes the menu, and then prevents it from being open again; each subsequent click will fire the “close” event.
Any other information you believe would be useful?
Here’s why this is a problem for me:
After toggling, clicking the “settings” button again does nothing, but the “cancel” event continues to fire.
I’m not entirely sure if I’m doing this right. I’ll try creating a component using the foundation class rather than using the menu-simple built in object and report back.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
HTMLDialogElement: cancel event - Web APIs | MDN
The cancel event fires on a <dialog> when the user instructs the browser that they wish to dismiss the current open dialog.
Read more >vb.net - ContextMenuStrip.Opening event Handler fires with e.cancel ...
I found my problem: I'm populating the ContextMenuStrip within the Opening event, so the first time it is called it is empty and...
Read more >Cancel a meeting - Microsoft Support
Double-click the meeting to open it. On the ribbon, click Cancel Meeting. The meeting form will change into a meeting cancellation form. Type...
Read more >Cancel event - Stripe JS Reference
Setting up · The Elements object · The Element · Payment Intents · Setup Intents · The Payment Request object · Payment Methods...
Read more >cancel - API Reference - Kendo UI Grid - Documentation
The widget instance which fired the event. Example - subscribe to the "cancel" event during initialization. Edit Preview Open ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sounds easy enough; I can give it a shot.
This is most likely obsolete since the Menu component has since been refactored. Feel free to comment if this is still reproducible with current MDCMenu.