-
-
Notifications
You must be signed in to change notification settings - Fork 333
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
Paper menu still works with a disabled paper button #774
Comments
You can disable a menu with Looks like it doesn't apply any disabled style though which could be good to add. I guess in the meantime you could disable both the menu and button |
I know this is a very old post, but I ran into this today. Alas Subtletree's suggestion did not work (and I see no code in Paper Menu suggesting that I was able to write an automated rendering test that would click the child of a disabled button, which would open the menu. For us it seems specific to clicking children of the disabled button. My fix was to conditionally stop propogation depending on the disabled state. Something like... // template
<PaperMenu as |menu|>
<menu.trigger>
<PaperButton @disabled={{this.isDisabled}}>
<span {{on "click" this.handlePropagation}}>Child Element</span>
... // component js
...
@action
handlePropagation(event) {
if (this.isDisabled) event.stopPropagation();
}
... |
Ah looks like |
I added the argument back. Should be fixed in the next release. Thanks for reporting! |
Please try |
The issue comes up again in |
The paper menu still pops up if I disable the paper button that activates the paper menu.
This would be a scenario where I would like to prevent any user interaction on the menu (disable the whole menu). For now I can just disable all menu items as a workaround and give the disabled button aesthetic affordance.
The text was updated successfully, but these errors were encountered: