Repository navigation
[2.0] fix(ui): open BlockEditor mention links with noopener - #38089
Merged
Merged
Conversation
(cherry picked from commit 5fd9b6c)
gh-bot-collate
Bot
requested review from
ShaileshParmar11
and removed request for
a team
November 18, 2026 07:29
Author
|
🤖 This backport will not merge itself: |
2 tasks done
harsh-vador
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Automated backport of #38086 to
2.0.5fd9b6c167aee8d4683c22e1f34d4594ac725c6bResolution notes
Backport notes: PR #38086 → 2.0
Source change: add
noopener,noreferrerto thewindow.opencall used when aBlockEditor mention/hashtag link is clicked, so the new tab can't reach back
into the opener via
window.opener.Conflicts and resolution
On
mainthis logic lives in a standaloneopenMentionLink(target)helper(added by a later, unrelated refactor that also handles an "AI shell /
settings-modal" link case via
getSettingsHashForHref). That helper andgetSettingsHashForHrefdo not exist on2.0— the equivalent logic on2.0is still inline insidehandleLinkPopupinEditorSlots.tsx, where mention/hashtag links are opened withwindow.open(href, linkTarget);(no helper extraction, no settings-hashcheck).
EditorSlots.tsx: Dropped the incomingopenMentionLinkhelperentirely (it depends on
getSettingsHashForHref, which isn't present on2.0, and the refactor that introduced the helper is out of scope for this
backport). Instead applied the actual fix in place, on 2.0's existing
inline code path:
EditorSlots.test.tsx: Kept the newdescribe('EditorSlots mention links', ...)test case from the source PR, which exercises exactly thisbehavior via
ref.current.onMouseDown(...)and assertswindow.openwas called with'noopener,noreferrer'. Dropped thetrailing
describe('EditorSlots menus', ...)block that appeared in thesame conflict hunk — it tests an
editableprop onEditorSlotsthatdoesn't exist on 2.0 (2.0's
EditorSlotsonly destructures{ editor, menuType }), so that block belongs to a separate, unbackported main-onlychange and isn't part of PR fix(ui): open BlockEditor mention links with noopener #38086.
What a reviewer should check
EditorSlots.tsx: confirm thewindow.opencall inside the['mention', 'hashtag'].includes(dataType)branch ofhandleLinkPopupisthe only change, and no
openMentionLink/getSettingsHashForHrefreference was left behind.
EditorSlots.test.tsx: confirm only themention linksdescribe block wasadded, and the file still ends after it (no
menusdescribe block, noeditableprop reference).node_modulesnot installed); afollow-up CI run of
yarn test src/components/BlockEditor/EditorSlots.test.tsxshould be the first signal to watch.
Opened from openmetadata-collate, which holds the credentials needed to open a PR here. It merges itself once this branch's required checks pass — no review needed. If a check fails it stays open and the author of #38086 is asked to look.
resolver run


Confidence Score: 5/5
This PR appears safe to merge.Summary
Backports the mention-link safety fix without bringing in unrelated editor changes.
No actionable issues found. Tests were not run.
Reviews (1) · Last reviewed commit: "fix(ui): open BlockEditor mention links ..." · Reviewed by Greptile