microsoft / microsoft/monaco-editor

[Bug] Some text keystrokes do not work in Firefox when accessibilitySupport = on

Open
#4,892 1 comment 5 reactions 0 assignees View on GitHub

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?
Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.52.2#XQAAAAJ6AQAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscwziDVO_1uhs0-3YGTBOsVJ4S4FwfCDQb5-2uUHXTVAefbVSd9IzaZ_vv9VR9KugsKimARHSWlrTPOQHROITHxmAetfeRrm3VHdSe7_Etv6WpgzlH4vE8EOD3EPhJDl6tDpOO8RxKZbUytKns3T0NFFloo9Q21KsEBT298I6cyZc5-Glup9UHU6QTpv2Hjab6pZzB3ZO2RH-WGhzXse2-hNlgz6zCgsG8AjiqGg0ZzWzND7z09NmCQOQd6pfkNvO2zmMzFvHpTY8RFEy1urlQcQMaso8TJINYBUpqH_RupAfPCERXHZP2ZE1LguZR1qpiZnP9EPHsA

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.

  1. Go to Preview window and place cursor anywhere in the editor.
  2. 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.
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.