mirror of
https://github.com/stablyai/orca.git
synced 2026-11-19 04:23:57 +00:00
The deferred focus('start') in autoFocusRichEditor ran even after the user
had already clicked or typed in the editor. In hidden or busy windows the
frame lands late (hidden windows paint at 1 Hz), so text typed into a new
Markdown file was split around a caret jump to the start, and a click
selection in a freshly opened file snapped back to the first line.
Skip the deferred focus when the editor is already focused and its doc or
selection changed since the focus was scheduled.
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>