Skip to content

[ui5-link]: The target attribute is ignored #13116

@mofterdinger

Description

@mofterdinger

Bug Description

Hi, I'm facing an issue with the target property of the ui5-link control. I'm setting the target property to a custom value, e.g. my-target. After clicking on the link two times, it opens two browser tabs pointing to the same href.
I'm expecting that only one browser tab is opened, independent of the number of clicks on the link. All clicks should have the same target tab / window.

Affected Component

ui5-link

Expected Behaviour

If a custom target is specified at a ui5-link, each click on the link should open the "same" tab, not a new one.
I expect the same behavior as with the standard HTML tag <a>.

Isolated Example

https://ui5.github.io/webcomponents/play/#eNq9U8GO0zAQ_RWvT7tVHcMBCYUUIZblBAKJckDKxbWnjXcd24qdhlD13xk7CeoK2OMqluJ545nneTM-UW0V_Cya2BpanqgVLdDyElxT6WwEGxGurhgj3ojx0LneKrZ3RhHG3ta2uvrw5Xb74-sdSUEJSH9ihD1sagq2pohNX9WAUGgRXFWIo4FkrErr4nWpYK8tqBtyQkzpkMhKYp2FNwicU3xmyP696yQoJp1xHRPqvg_x0VlS8SX_89NVLURBZCO6ABE1-L79yF5nGWZXkhrxo4bBuy7WlMxCIzhoFZuNgqOWwLKxJtrqqIVhQQoDm5fFizlZ1BE5v4nWG6j4ZKHKfJYZtzunRpKvhql3Qj7M7cuVlOQoumvGgvDv_7huk-dmJvhH0xnYufHpQK9fMaPtA1EQ9MEiyV3rGxH0L1BYVtPBHrEmRh9KzodhKJCskK5FZxTdIevTjmzaT6yfR7KdzKTrwjAT_ncMscOy0z6SOPpUbOtUbwBpQieTKbQt7gMyYKvywaxU0mdSii_T-2TN9LxeUl28mQW5fDB8dZml0QrIitdWt6njpKYFv3CH3ic4XxBH6u_YfINH8e9QGD7ADrX0OIg2Bo5THPkn1GrKQ8_n3xbKWO4

Steps to Reproduce

  1. Open the provided sample
  2. Click several times on link My Target
  3. Several browser tabs are opened.
    ...

Log Output, Stack Trace or Screenshots

No response

Priority

Medium

UI5 Web Components Version

2.19.2

Browser

Firefox

Operating System

MacOS 26.3

Additional Context

No response

Organization

SAP SE

Declaration

  • I’m not disclosing any internal or sensitive information.

Metadata

Metadata

Labels

TOPIC BbugThis issue is a bug in the code

Type

Projects

Status

New Issues

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions