markdown-toolbar-element icon indicating copy to clipboard operation
markdown-toolbar-element copied to clipboard

The `role` code is never executed in base `MarkdownButtonElement`

Open wxiaoguang opened this issue 2 years ago • 2 comments

The role code is never executed in base MarkdownButtonElement

    connectedCallback() {
        if (!this.hasAttribute('role')) {
            this.setAttribute('role', 'button');
        }
    }

Because other classes like MarkdownHeaderButtonElement extends MarkdownButtonElement never call parent class's connectedCallback

wxiaoguang avatar Apr 11 '23 06:04 wxiaoguang

Great catch! PRs welcome for sub components to call super.

keithamus avatar Apr 12 '23 16:04 keithamus

I haven't gotten time for it, feel free to fix it by your plan.

wxiaoguang avatar May 03 '23 08:05 wxiaoguang