diff --git a/iconbutton/internal/icon-button.ts b/iconbutton/internal/icon-button.ts index 106e08954b..81cdd5fbdf 100644 --- a/iconbutton/internal/icon-button.ts +++ b/iconbutton/internal/icon-button.ts @@ -267,9 +267,8 @@ export class IconButton extends iconButtonBaseClass implements FormSubmitter { private renderRipple() { const isRippleDisabled = !this.href && (this.disabled || this.softDisabled); - // TODO(b/310046938): use the same id for both elements return html``; } diff --git a/internal/events/dispatch-hooks.ts b/internal/events/dispatch-hooks.ts index 9f27cab2a7..e67f491ff4 100644 --- a/internal/events/dispatch-hooks.ts +++ b/internal/events/dispatch-hooks.ts @@ -154,7 +154,7 @@ export function setupDispatchHooks( // Re-dispatch the event. We can't reuse `redispatchEvent()` since we // need to add the hooks to the copy before it's dispatched. isRedispatching = true; - const dispatched = event.composedPath()[0].dispatchEvent(eventCopy); + const dispatched = element.dispatchEvent(eventCopy); isRedispatching = false; if (!dispatched) { event.preventDefault(); diff --git a/internal/events/dispatch-hooks_test.ts b/internal/events/dispatch-hooks_test.ts index 3cb40da93b..efe9c18d92 100644 --- a/internal/events/dispatch-hooks_test.ts +++ b/internal/events/dispatch-hooks_test.ts @@ -39,21 +39,6 @@ describe('dispatch hooks', () => { .withContext('element.addEventListener') .toHaveBeenCalledTimes(3); }); - - it('triggers internal event listeners when a composed element is the source of the event', () => { - const shadowRoot = element.attachShadow({mode: 'open'}); - const composedElement = document.createElement('button'); - shadowRoot.appendChild(composedElement); - const innerClickListener = jasmine.createSpy('innerClickListener'); - composedElement.addEventListener('click', innerClickListener); - - setupDispatchHooks(element, 'click'); - composedElement.click(); - - expect(innerClickListener) - .withContext('innerClickListener') - .toHaveBeenCalledTimes(1); - }); }); describe('afterDispatch()', () => {