Skip to content

Caret visually jumps to right edge of page after Shift+Enter (cosmetic only) #3505

@nathan-ahs

Description

@nathan-ahs

What happened?

When typing text in the editor and pressing Shift+Enter to insert a soft line break, the caret is rendered at the right edge of the page on the new line, instead of at the left margin where the next character will actually appear.

Visually, the cursor appears right-aligned, but typing a character then snaps it back to the expected left-aligned position. This makes it look like the paragraph alignment has changed, even though it hasn't.

The bug is purely visual:

  • The caret looks right-aligned after the Shift+Enter.
  • If you type a character, it is still inserted at the left of the new line as expected, and the caret then snaps back to its correct position right after the inserted character.

Expected: the caret should render at the left margin (or wherever the paragraph alignment dictates) immediately after the Shift+Enter, matching where the next character will be inserted.

Actual: the caret renders at the right edge of the page until the next keystroke.

Steps to reproduce

  1. Open SuperDoc (reproduced on the public demo and in a local integration on v1.35.0).
  2. Click into a left-aligned paragraph and type any text, e.g. hello.
  3. Press Shift+Enter to insert a soft line break.
  4. Observe the caret on the new line — it is rendered at the right edge of the page.
  5. Type any character — it is inserted at the left as expected, and the caret snaps back to its correct position.

SuperDoc version

1.35.0 (also reproduced on the live demo)

Browser

Firefox

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions