Skip to content

Editor: Fix tiny cursor in the empty editor#4300

Open
ayshushus wants to merge 1 commit into
mozilla:mainfrom
ayshushus:4249
Open

Editor: Fix tiny cursor in the empty editor#4300
ayshushus wants to merge 1 commit into
mozilla:mainfrom
ayshushus:4249

Conversation

@ayshushus

@ayshushus ayshushus commented Jul 9, 2026

Copy link
Copy Markdown
Collaborator

Fix #4249

add drawSelection() to CM.

Test in Nightly.

@ayshushus
ayshushus requested a review from flodolo July 9, 2026 21:14
@ayshushus

Copy link
Copy Markdown
Collaborator Author

I spent a lot of time trying a native fix instead of a CM-drawn approach, this caused me to hard code a 10px offset positioning which I think is not scalable and in fact a potential footgun.

@ayshushus
ayshushus marked this pull request as ready for review July 9, 2026 21:16
@ayshushus ayshushus self-assigned this Jul 9, 2026
@flodolo
flodolo requested review from eemeli and removed request for flodolo July 10, 2026 04:04
@flodolo

flodolo commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Redirecting to Eemeli, since he knows more about CodeMirror than me.

@eemeli eemeli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable. Could you also investigate if this does anything for #4240?

@ayshushus

Copy link
Copy Markdown
Collaborator Author

Could you also investigate if this does anything for 4240?

Yes. This has caused changes. They are to both the behavioural aspects you mentioned in #4240

  1. cursor goes missing, press fn + arrow/Up/Cmd + arrow twice: on PR branch. This is currently the dancing pixel behavior in Pontoon.
  2. cursor doesn't go to end of term, press fn + arrow/Up/Cmd + arrow twice on PR branch. This is currently the switching between the two ends of the placeholder in Pontoon.

@eemeli

eemeli commented Jul 14, 2026

Copy link
Copy Markdown
Member

Could you describe the changes this PR makes to the behaviour of the cursor in RTL messages? I don't understand from your previous comment what the changes are, and whether they make the situation better or worse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tiny cursor in the empty editor

3 participants