Skip to content

Change Method Signature: parameter Type field doesn't visibly render typed text (contenteditable text node escapes shadow DOM slot) #4417

Closed

Description

@benanavd

Environment

  • OS: Windows 10/11 x64
  • VS Code version: not captured
  • Java extension version: 1.55.2026052308 (redhat.java)
  • JDK: not captured

Steps to reproduce

  1. Trigger Change Method Signature on any method.
  2. Click the Type cell of a parameter and type a new type.

Result

The typed text does not appear in the Type field - the cell looks blank or unchanged.

Inspecting the DOM shows the text is captured, but as a direct text node on the <vscode-data-grid-cell contenteditable="true"> host, sitting outside the shadow root, which contains only:

<template shadowrootmode="open"><slot></slot></template>

The text is therefore present in the DOM but not visibly rendered. Example captured DOM:

<vscode-data-grid-cell ... contenteditable="true">.</template>Stringdjdajljdlrfajedfla</vscode-data-grid-cell>

where String is the original type and the rest is typed input.

Expected

Typed text should be visible in the Type cell while editing.

Note

vscode-data-grid-cell is from the deprecated Webview UI Toolkit; the contenteditable text node is not being placed into a slotted/rendered position.

Activity

  1. benanavd commented on May 30, 2026

    @benanavd
    Author

    Adding the environment details that were missing from the original report, plus a tightened reproduction:

    Environment

    • OS: Windows 11 x64 (build 26200)
    • VS Code version: 1.122.1 (user setup), commit 8761a5560cfd65fdd19ce7e2bd18dab5c0a4d84e, Chromium 142.0.7444.265, Electron 39.8.8
    • Java extension version: 1.55.2026052308 (redhat.java)
    • JDK: 21 (JavaSE-21)

    Steps to reproduce (any project, any method)

    1. Place the cursor on a method name, trigger the refactor, and choose Change Method Signature.
    2. In the dialog, click the Type cell of an existing parameter to edit it.
    3. Type any text (e.g. a new type name).

    Result

    • The typed text never appears in the cell — it looks blank/unchanged while editing.
    • On clicking OK, the typed text is committed but appended to the original type rather than replacing it.

    Root cause (confirmed via DOM inspection)
    The edited text is captured as a bare text node placed directly on the contenteditable <vscode-data-grid-cell> host, outside its shadow root. The shadow root template is only:

    <template shadowrootmode="open"><slot></slot></template>
    

    so the text node is never assigned to a slotted/rendered position. It exists in the DOM but is never painted, which explains both the invisible-while-typing behavior and the append-on-commit behavior (new text node concatenated after the original type still on the host). Example captured DOM:

    <vscode-data-grid-cell ... contenteditable="true">.</template>Stringdjdajljdlrfajedfla</vscode-data-grid-cell>
    

    (String = original type, rest = typed input.)

    vscode-data-grid-cell comes from the deprecated/archived Webview UI Toolkit, so this likely needs the dialog migrated off that component rather than a point fix.

    Happy to attach a short screen recording of the empty field + append-on-OK if that helps reproduction.

  2. benanavd commented on May 30, 2026

    @benanavd
    Author

    Confirmed: reproduces identically when launched with --disable-gpu, so this is not GPU/compositing-related — consistent with the contenteditable text node escaping the shadow-DOM slot rather than a rendering-layer problem.

  3. wenytang-ms commented on Jun 30, 2026

    @wenytang-ms
    Contributor

    working on #4449

  4. added this to the End of July 2026 milestone on Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions