Where does the bug appear (feature/product)?
Somewhere else…
Describe the Bug
Published canvases: links do not open on a single click (works correctly in the IDE).
In the Cursor IDE, a single left click on a Link from cursor/canvas works correctly and
opens the URL in the browser. In a published canvas opened through its share URL in a
browser, the same link does nothing on a single left click. Only cmd-click on macOS or
ctrl-click on Windows opens it.
So the SDK component behaves correctly in the editor, and the published web viewer is the
surface that drops the click.
Likely cause: the published viewer appears to render the canvas in a sandboxed iframe
without allow-popups or top-level navigation, so neither the anchor’s default navigation
nor window.open can fire. The IDE webview presumably routes anchor clicks through the
workbench opener service instead, which is why it works there.
Authors have no way to work around this from inside a canvas. useCanvasAction exposes only
openAgent, newComposerChat and openFile, and the canvas commands registered in the shipping workbench bundle (canvasNavigationCommands.js) are canvas.openAgentByConversationId, canvas.newComposerChat, canvas.openFileInWorkbench, canvas.getHostThemeState, canvas.handleCanvasError, canvas.handleCanvasErrorCleared, canvas.shareCanvas, canvas.shareKeySalt, cursor.canvas.openVisibleInlinePreview and
cursor.canvas.classicSidebarExpanded.
None opens an external URL. I also tried a raw anchor with target="_blank" and rel="noreferrer noopener" plus an onClick calling window.open, and in the published canvas it fails the same way as the SDK Link.
Suggested fix: allow popups in the published canvas viewer’s iframe sandbox so that
target="_blank" anchors and window.open work, matching the behavior already present in the
IDE.
For context, previous canvas link issues were all IDE-side and are not this bug: t/158228,
t/159415 and t/162179 covered one click opening N tabs from listener accumulation, reported
fixed; t/168480 covers links in chat that open a canvas.
Impact: we publish canvases as analytical documents that cite Confluence pages, dashboards, tickets and repositories. The published share URL is how these reach an audience, and that audience did not author the document and has no reason to guess at a modifier key, so every citation is unusable for exactly the readers the document was written for. It works fine
for the author in the IDE, which makes it easy to miss before sharing.
Steps to Reproduce
- Create a canvas containing an SDK link:
<Link href="https://example.com">Example</Link> - Open the canvas in Cursor and left click the link. It opens correctly.
- Share the canvas and open the share URL in a browser.
- Left click the same link. Nothing happens.
- Cmd-click it. It opens.
Expected Behavior
A plain left click opens the link in a new browser tab, once.
Operating System
MacOS
Version Information
IDE: 3.17.19
Does this stop you from using Cursor
No - Cursor works, but with this issue