monaco-editor
monaco-editor copied to clipboard
[Bug] Typing is blocked after right click in the editor when set `contextmenu` to false
Reproducible in vscode.dev or in VS Code Desktop?
- [X] Not reproducible in vscode.dev or VS Code Desktop
Reproducible in the monaco editor playground?
- [ ] Not reproducible in the monaco editor playground
Monaco Editor Playground Link
https://microsoft.github.io/monaco-editor/playground.html?source=v0.49.0#XQAAAALJAQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwz_GxhBJ5fIHXMASoNoP2xswbooi08h0RuE1UDbfMloSJTJ96e9a92yGy9rsUOSS3CorNJNbYJPe7HqptEMy32ZThw_sFlmuw51bxKsb_rKqPkAUEX-VNt4yrf3cAmTwJa9MACRwSwwtF2PbQ2AAswmnyIUm4AWpzYxlZ_B60BBbceC-OLqAuoUowSNNqtfjOxQOub1kamYtXXY5Z2HDq_yqsifTjJzNKAO_tNcApVQsp51yWxO7WFNjA3lbqwnHjKbDW4BqPxQwxIoi3TWuVDSVLwpyRyOlHkxH7zUBrhvZ5vWUJxxtik9RVySb-AsvQi6aCxlh29IC9ggsxO-zoVwK-e1cVIBEBprcW0SJOUy1ys106GyinQjGccRFSZSwx_-gn-gg
Monaco Editor Playground Code
const value = /* set from `myEditor.getModel()`: */ `function hello() {
alert('Hello world!');
}
{{{}}}jjjjjjjj`;
// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
value,
language: "javascript",
automaticLayout: true,
bracketPairColorization: {enabled: false}
});
myEditor.updateOptions({
contextmenu: false
})
Reproduction Steps
- Simply set
contextmenuto false - Right click in the editor
- Then try typing in the editor. The cursor is blinking, however, typing is blocked
Actual (Problematic) Behavior
The typing is blocked after right click in the editor
Expected Behavior
The typing should not be blocked
Additional Context
No response