Skip to content

[Bug] Rename popup for JS/TS private members does not include the # character #5205

@spahnke

Description

@spahnke

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.55.1#XQAAAAJQAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwzS98RgmSaumWUF-TBOsVJ4S4FwfCDQb5-2uUHXTVAefbVSd9IzaZ_vv9VR9KugsKikU_wkLK9jT_o8SJzPv4k8g9Sb1c0Vhw1m9L2V6fITJixjKOWlQkasTOk0BKGvRJOQpwxIb5XQVsN9NClXRLqHLhHyOVXnz3_P8-kZ6F3fn06j7Tic3EGUaUHEQKzIn7jX0X_CWXbKf2_aI6WLoTJJPezM77MJ743Iklw8Zgl3J6iPXuJHLFtfDPDfEeq8UtvEvIaXPLgBg6R_7VlnTat76OG5W7-9CkFg

Monaco Editor Playground Code

const value = /* set from `myEditor.getModel()`: */ `class Foo {
	#test() {
		
	}
}`;

// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "javascript",
	automaticLayout: true,
});

Reproduction Steps

Put the cursor on the method name #test and press F2 to rename

Actual (Problematic) Behavior

The # is not included in the popup text field, which means after the rename the method/field might be accidentally made public if you forget to add the # back.

Image

Expected Behavior

The # is included in the text field like in VSCode:

Image

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions