Simple Browser: window.open host-side fanout leaks across tab close cycles — one click opens N tabs after N close-all cycles

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

In Cursor’s built-in Simple Browser, each close-all-and-reopen cycle leaves a
phantom “open URL” handler in the webview host. A single window.open(url,
‘_blank’) — from page JS, Cmd-click on an <a href>, or middle-click — then
spawns N Simple Browser tabs, where N is the number of cycles since the last
Developer: Reload Window.

DevTools confirms exactly ONE JS-level window.open call per gesture, so the
fanout is host-side and downstream of the page — page-side dedupes don’t help.

Same class of bug as the Canvas accumulation issues, but in Simple
Browser

Steps to Reproduce

  1. Cmd+Shift+P → Developer: Reload Window (start clean).
  2. Open a Simple Browser tab to any HTML page containing a link, e.g. https://example.com/.
  3. Cmd-click the link → 1 tab opens. :white_check_mark:
  4. Close every Simple Browser tab in the window (until zero remain).
  5. Open a new Simple Browser tab back to the same URL.
  6. Cmd-click the same link → 2 tabs open with identical URL. :cross_mark:
  7. Close all → open new → click → 3 tabs. Continues linearly.
  8. Only Developer: Reload Window (or a full IDE restart) resets the counter.
    Confirmation the leak is host-side, not page-side:
  • In Simple Browser DevTools, wrapping window.open shows exactly ONE JS-level
    call per Cmd-click, regardless of how many tabs open.
  • Installing a page-side dedupe on window.open (300 ms window, collapses
    identical bursts) does not reduce the tab count. The fanout is downstream
    of the page.

Expected Behavior

One click / one JavaScript window.open call should open exactly one Simple
Browser tab, regardless of how many times Simple Browser tabs have been
opened and closed in the current window.

Operating System

MacOS

Version Information

Version: 3.9.16 (Universal)
VS Code Extension API: 1.105.1
Commit: 042b3c1a4c53f2c3808067f519fbfc67b72cad80
Date: 2026-06-27T06:41:01.941Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0

Does this stop you from using Cursor

No - Cursor works, but with this issue

Oh, seems to be fixed in the latest version:

Version: 3.10.11 (Universal)
VS Code Extension API: 1.125.0
Commit: 4ef9fe3d055f8c4523179a090f14eb835bc3c940
Date: 2026-07-03T04:44:14.398Z
Layout: IDE
Build Type: Stable
Release Track: Default
Electron: 40.10.3
Chromium: 144.0.7559.236
Node.js: 24.15.0
V8: 14.4.258.32-electron.0
xterm.js: 6.1.0-beta.256
OS: Darwin arm64 25.5.0