Skip to content

fix(link-tool): open new window with url when formatted link clicked via ctrl key#2996

Merged
akulistus merged 6 commits intonextfrom
fix/formatted-link-click
Mar 11, 2026
Merged

fix(link-tool): open new window with url when formatted link clicked via ctrl key#2996
akulistus merged 6 commits intonextfrom
fix/formatted-link-click

Conversation

@akulistus
Copy link
Contributor

Problem:
When clicking a formatted link, inline elements (e.g., bold, italic) may be returned as the event target instead of the anchor element. As a result, the expected link behavior is not triggered.

Issue:
#2995

Solution:
Check whether the event target has an anchor () element among its ancestors and use that element to process the link action.

Co-authored-by: Peter <specc.dev@gmail.com>
Co-authored-by: KoshaevEugeny <103786108+akulistus@users.noreply.github.com>
.should('contain', 'Bold and italic text');
});

it('should open formatted link in the same tab', () => {
Copy link
Member

Choose a reason for hiding this comment

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

test name is not clearly describes the case you just fixed

Co-authored-by: Peter <specc.dev@gmail.com>
@akulistus akulistus merged commit 530ec56 into next Mar 11, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants