fix(iconbutton): handle activation click#5533
fix(iconbutton): handle activation click#5533vdegenne wants to merge 1 commit intomaterial-components:mainfrom
Conversation
|
@asyncliz I followed the same idea as |
|
The form label activation is used to make Can we try overriding the click method instead? I think it makes more sense to forward the initial click to the delegated element, rather than trigger a host click which re-triggers a button click. override click() {
this.buttonElement?.click();
}If it's more complicated then I'm open to the current approach, but I want to add some documentation to explain what's going on. |
|
|
||
| @state() private flipIcon = isRtl(this, this.flipIconInRtl); | ||
|
|
||
| @query('.link') private readonly linkElement!: HTMLElement | null; |
There was a problem hiding this comment.
Update this to capture both the button and anchor element that could be rendered. Both can have clicks forwarded to them.
@query('.icon-button') private readonly buttonElement!: HTMLElement | null;
fixes #5532