githubnext/chopinPublic

Let's compose rich plans together

Stop typing on a selected decision card from landing at the document start

Lexical marks a selectionchange as pointer-driven on pointerdown and only
clears that on the next selectionchange. When none follows the click
(clicking where the caret already is, or a key pressed in the same frame),
the stale flag survives until arrowing onto a card removes the DOM range.
Chrome then parks its caret at the root start, Lexical treats that
selectionchange as a click back onto text, and typing lands at the top of
the document. A key press now clears the pointer's claim.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
C5MAMaggie Appleton and Claude Opus 5.5 authored
37e04cbPatch
Parent6c81f7d
3 files changed+65-0
StackedSplit
e2e/decision-marker.e2e.ts+31 โˆ’0
packages/editor/src/widgets/decorator-selection.test.ts+14 โˆ’0
packages/editor/src/widgets/decorator-selection.tsx+20 โˆ’0