[GH-ISSUE #3934] Typographic quotes can move the input caret behind later text #2128

Closed
opened 2026-10-21 05:45:37 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @SpicyMarinara on GitHub (Jul 22, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3934

Originally assigned to: @SpicyMarinara on GitHub.

Description

With Typographic quote formatting enabled, quickly typing text after a straight apostrophe or quotation mark can move the caret back to the position immediately after the converted quote.

For example, typing wasn't can leave the caret between ’ and t, even though the t was already entered.

Steps to reproduce

  1. Enable Settings → Text & Display → Quote style → Typographic.
  2. Open a Roleplay chat and focus the message input.
  3. Type wasn't without pausing after the apostrophe.
  4. Observe the caret after the delayed quote-selection restoration runs.

The same race can occur after a double quote.

Expected behavior

Quote conversion should not overwrite a newer caret position. The caret should remain after the latest character entered.

Root cause

The quote formatter schedules selection restoration across microtask and animation-frame boundaries. A scheduled restoration can survive a subsequent keystroke and reapply the selection captured when the quote was converted.

Originally created by @SpicyMarinara on GitHub (Jul 22, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3934 Originally assigned to: @SpicyMarinara on GitHub. ## Description With **Typographic** quote formatting enabled, quickly typing text after a straight apostrophe or quotation mark can move the caret back to the position immediately after the converted quote. For example, typing `wasn't` can leave the caret between `’` and `t`, even though the `t` was already entered. ## Steps to reproduce 1. Enable **Settings → Text & Display → Quote style → Typographic**. 2. Open a Roleplay chat and focus the message input. 3. Type `wasn't` without pausing after the apostrophe. 4. Observe the caret after the delayed quote-selection restoration runs. The same race can occur after a double quote. ## Expected behavior Quote conversion should not overwrite a newer caret position. The caret should remain after the latest character entered. ## Root cause The quote formatter schedules selection restoration across microtask and animation-frame boundaries. A scheduled restoration can survive a subsequent keystroke and reapply the selection captured when the quote was converted.
bsakaguchi 2026-10-21 05:45:37 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#2128
No description provided.