adobe / adobe/spectrum-web-components

[Bug]: SP-MENU-ITEM href, target="_blank" opening same tab twice when mouse clicked

Open
#5,727 2 comments 0 reactions 0 assignees View on GitHub
bug Component:Menu SEV 3 triage
Dominant language
TypeScript
Stars
1.5k
Forks
262
Avg merge
3d 10h
Merged PRs (30d)
68

Description

### Code of conduct

- [x] I agree to follow this project's code of conduct.

### Impacted component(s)

sp-menu-item

### Library version

@spectrum-web-components/1.7.0

### Expected behavior

In Chrome, with `Pop-ups and redirects` enabled, clicking a `sp-menu-item` with href _and_ `target="_blank"` should open a single tab.

This is similar to the issue that was fixed in April 2025: https://github.com/adobe/spectrum-web-components/issues/5203.

### Actual behavior

In Chrome, with `Pop-ups and redirects` enabled, clicking a `sp-menu-item` with href _and_ `target="_blank"` opens two tabs.

### Screenshots

_No response_

### What browsers are you seeing the problem in?

Chrome

### How can we reproduce this issue?

In Chrome, allow sites to send pop ups.

1. In Mac Chrome 140.0.7339.132, open settings.
1. Search for `site settings`
1. Click on `Pop-ups and redirects`
1. Click `Sites can send pop-ups and use redirects`

Now add `target="_blank"`
1. Go to menu-item.stories and add `target="_blank"` [here](https://github.com/adobe/spectrum-web-components/blob/main/packages/menu/stories/menu-item.stories.ts#L152-L154).
1. Run `yarn storybook`
1. Open `Menu Item` story and click the changed menu item.

### Sample code or abstract reproduction which illustrates the problem

_No response_

### Severity

None

### Logs taken while reproducing problem

_No response_

### Would you like to track this issue in Jira?

- [x] Yes, please tell me the ticket number!

Contributor guide

Open the contributing guide

Research direction

Start with packages/menu/stories/menu-item.stories.ts at the linked menu-item example, run yarn storybook, and reproduce the Chrome behavior with href and target="_blank". Compare the related issue 5203 while tracing sp-menu-item's click handling; done means the example opens exactly one tab in the stated Chrome setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.