Skip to content

Some decorations can cause vertical caret navigation to jump to end of line #1612

@iansan5653

Description

@iansan5653

Describe the issue

Certain combinations of CSS rules applied to decorations can cause the caret to consistently jump to the end of the current line on Arrow Down instead of navigating down to the next line:

Screen.Recording.2025-09-10.at.11.49.19.AM.mov

I assume that this is related to how this decoration changes the height of the line. But it's not as simple as that because not all height-changing decorations reproduce the issue.

For example, the following CSS reproduces the bug:

.decoration {
  border-bottom: 0.3em solid gray;
  font-size: 2em;
}

However, this CSS does not, despite being almost the same:

.decoration {
  border-bottom: 0.25em solid gray;
  font-size: 2em;
}

And it's not just a height threshold, because this CSS also does not reproduce it despite being taller:

.decoration {
  font-size: 3em;
}

This decoration is applied using a StateField as required.

Browser and platform

Chrome 139 on MacOS Sequoia 15.6.1

Reproduction link

https://codesandbox.io/p/sandbox/jz93dp

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions