Skip to content

Undo in an extension's own custom document doesn't reach the extension on Windows #87

Closed

Description

@BartvHelvert

What happened

On Windows, Ctrl+Z in a custom editor whose extension keeps its own document (CustomEditorProvider, not a text-based one) never reaches the extension. In SplitModeCustomEditorTest › "an extension's own document undoes its edits, saves, and is saved when closed with changes", the counter page shows "Count: 2" and the workbench has both edits (the tab is modified). Then Ctrl+Z is pressed with the page focused, and the extension is never asked to undo: its state stays at "undone":0 until the test times out at "the extension asked to undo".

This happens on every windows-2025 run since the test was given its step-by-step checks in #65: master (run 42088695278) and every open PR (#73, #74, #78, #79, #80, #82). The same test passes on Linux, and so does the custom text editor test on Windows, whose undo goes through the text document.

The page passes the workbench's undo on itself: bootstrap.js sends kundo from a keydown listener, which CustomEditor turns into undoCustomEditor. So either the page never gets the key on Windows (the browser is off-screen rendered, JBCefOsrComponent, and the IDE sees Ctrl+Z first), or the message is dropped on its way to the backend. Nothing is logged on either side.

Steps to reproduce

  1. Run SplitModeCustomEditorTest in split mode on Windows.
  2. See the counter editor's first Ctrl+Z time out at "the extension asked to undo".

Extension

The test's probe extension (probe.counterEditor). This affects any extension with an editable CustomEditorProvider, such as draw.io's or a hex editor.

Operating system

Windows (GitHub windows-2025 runner). Passes on Linux.

IDE mode

Split mode (JetBrains Client)

Acceptance criteria

  • Ctrl+Z, Ctrl+Shift+Z and Ctrl+Y in a custom document's page undo and redo its edits on Windows.
  • The counter editor test passes on the windows-2025 runner.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions