[Bug] Setting tabFocusMode on initial monaco.editor.create does not properly set value
chaycer opened this issue · comments
chaycer commented
Reproducible in vscode.dev or in VS Code Desktop?
- 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
Monaco Editor Playground Code
const value = /* set from `myEditor.getModel()`: */ `function hello() {
alert('Hello world!');
}`;
// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
value,
language: "javascript",
automaticLayout: true,
tabFocusMode: true, // This does not work
});
//Workaround
myEditor.trigger("Test", "editor.action.toggleTabFocusMode", true); //Have to manually do this
Reproduction Steps
Comment out the "myEditor.trigger" command. See that you get tab trapping. Uncomment it, and see that workaround fixes it.
Actual (Problematic) Behavior
As far as I can tell from documentation, the tabFocusMode property is supposed to set the toggletabfocusMode on the editor, but it does not seem to do that.
Expected Behavior
Setting tabFocusMode to true should automatically disable tab trapping
Additional Context
There is a workaround for now, but it seems like the setup feature is incorrect.