Skip to content

fix(web-components): stopImmediatePropagation on internalProxyAnchors#36085

Open
davatron5000 wants to merge 2 commits intomicrosoft:masterfrom
davatron5000:users/rup/fix/anchor-double-click-bug
Open

fix(web-components): stopImmediatePropagation on internalProxyAnchors#36085
davatron5000 wants to merge 2 commits intomicrosoft:masterfrom
davatron5000:users/rup/fix/anchor-double-click-bug

Conversation

@davatron5000
Copy link
Copy Markdown
Contributor

Previous Behavior

AnchorButton and Link were triggering duplicate clicks. Repro: https://stackblitz.com/edit/vitejs-vite-selgj5w1?file=src%2Fstyle.css,index.html,src%2Fmain.ts&terminal=dev

New Behavior

Use stopImmediatePropagation to prevent click from bubbling up form InternalProxyAnchor.

Related Issue(s)

@davatron5000 davatron5000 requested a review from a team as a code owner May 1, 2026 23:36
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

📊 Bundle size report

✅ No changes found

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-web-components/Accordion 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Accordion. - Dark Mode.normal.chromium_1.png 3154 Changed
vr-tests-web-components/Avatar 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Avatar. - Dark Mode.normal.chromium.png 10380 Changed
vr-tests-web-components/Badge 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Badge. - Dark Mode.normal.chromium.png 443 Changed
vr-tests-web-components/MenuList 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/MenuList. - Dark Mode.normal.chromium.png 498 Changed

Comment on lines +200 to +202
await element.evaluate(node => {
(node as HTMLElement).click();
});
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does await element.click() work here?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

[Bug]: Click on anchor button is executed twice

3 participants