You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Alt+click on an in-iframe anchor was preventDefault'ed with no navigation ever dispatched, so link navigation inside the builder was completely broken.
Fix resolves the nearest anchor ancestor (handles clicks on nested formatted text/images inside a link), then explicitly drives navigation instead of relying on the browser's native click — browsers alt-click an anchor as a download, not a navigation, so relying on default behavior doesn't work.
target="_blank" links open in a new tab instead of hijacking the builder iframe; same-page #hash links still scroll natively.
Test plan
npx vitest run src/visualBuilder/listeners/__test__/mouseClick.test.ts — 10/10 pass
Full suite (npx vitest run) — all pass, no regressions
Manual verification in Visual Builder against a real entry with an RTE link
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Fixes broken in-iframe link handling in the Visual Builder by ensuring Alt+click on links reliably triggers navigation (including resolving clicks on nested elements inside an <a>), rather than being swallowed with no navigation.
Changes:
Resolve the nearest anchor ancestor via closest("a") and explicitly navigate on Alt+click (including _blank behavior via window.open).
Add unit tests covering Alt+click navigation, _blank handling, and nested-element clicks inside anchors.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File
Description
src/visualBuilder/listeners/mouseClick.ts
Changes Alt+click handling to resolve nearest anchor and explicitly drive navigation/open-in-new-tab.
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
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.
Summary
target="_blank"links open in a new tab instead of hijacking the builder iframe; same-page#hashlinks still scroll natively.Test plan
npx vitest run src/visualBuilder/listeners/__test__/mouseClick.test.ts— 10/10 passnpx vitest run) — all pass, no regressionsAfter fix
Screen.Recording.2026-07-10.at.5.10.41.PM.mov