microsoft / microsoft/monaco-editor

Mouse selection displaced in Firefox when editor embedded in dom nodes using `translateX`

Open
#390 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

firefox upstream
Dominant language
JavaScript
Stars
46.8k
Forks
4.1k
Avg merge
17h 58m
Merged PRs (30d)
1

Description

When using mouse selection in Firefox on mobile.azure.com, the cursor doesn't match the text that gets selected, see the following video:

monaco-selection

This might be related to our usage of CSS translate - a (non-direct) parent element in the DOM has translateX: 260px applied, which would seem to match the displacement. There's no such problem in Chrome/Safari nor Edge.

monaco-editor version: 0.8.3
Browser: Firefox 51
OS: MacOS

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

No file or test is named. Start by reproducing the selection mismatch in Firefox 51 on mobile.azure.com with Monaco 0.8.3, then compare behavior in Chrome, Safari, and Edge while an ancestor uses translateX: 260px. Done means mouse selection aligns with the text in Firefox without regressing the other browsers.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.