microsoft / microsoft/monaco-editor
[Bug] Some text keystrokes do not work in Firefox when accessibilitySupport = on
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 46.8k
- Forks
- 4.1k
- Avg merge
- 17h 58m
- Merged PRs (30d)
- 1
Description
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
Note: Reproducible in playground. Not reproducible in VC Code Desktop.
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,
accessibilitySupport: "on"
});
Reproduction Steps
Note: Only occurs in Firefox and on Windows. Works fine with Chrome on Windows. Also works fine in FF on macOS.
- Go to Preview window and place cursor anywhere in the editor.
- Try to use standard Windows keyboard shortcut Control + Right Arrow, or Control + Left Arrow to move to beginning of next word / previous word. Nothing happens.
- Additionally, try to select next / previous word with Shift + Control + Right / Left Arrow. Observe nothing happens.
Update playground code to set accessibilitySupport: "off", and observe issue does not reproduce.
Also note: Does not reproduce on Mac, but Mac uses different OS commands for similar functionality (Alt+(Shift+)Left/Right).
Actual (Problematic) Behavior
accessibilitySupport setting interferes with OS default text keystroke behaviour in Firefox. Works in Chrome.
Expected Behavior
accessibilitySupport setting should not interfere with this behaviour.
Additional Context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Monaco playground and the provided TypeScript configuration; reproduce the problem in Firefox on Windows with accessibilitySupport set to "on", then compare it with "off" and Chrome. Trace the editor's keyboard handling for Ctrl+Left/Right and Shift variants, and verify that word navigation and selection work without regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100