Repository navigation
Conversation
…hinkFlowLab#394) Escape still keeps the picker closed while the caret stays on the same mention. A navigation key records that the caret has left, so a later return reopens even when selectionchange never reports the outside position.
github-actions
Bot
requested review from
FayeSpica,
Probiotics5333 and
allendyu
November 19, 2026 01:05
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
After Escape dismissed the project-asset picker at the
@in前@后, moving the caret out and back could leave the picker closed (aria-expanded=false) while the editor was still focused on that mention.close()keeps the dismissed mention start so Escape without motion stays closed. The selection-change path already cleared that dismissal when it saw an outside caret, but a rapid2 → 3 → 2move can be delivered only at the final offset. The previoussaved-equality guard then skippedupdateMention, so the leave was never observed.This change records a leave on caret-navigation keydown.
mentionDismissAfterEventreopens when the caret returns to the same mention after that leave, including whenselectionchangenever reports the outside position. Escape without motion is unchanged.Linked issue
Labels
type:bug,area:assets,area:canvas); this account could not apply them when opening the PRTest plan
Local (Linux, Node v24.22.1, tip
f125756conorigin/main58b6a96d, Asia/Shanghai). Isolated fixture only; no user project and no paid generation.The nightly failure was reported on
4360d9eb(reference_picker.mjstimed out 15s waiting for “引用项目资产” after Escape, right, then left; caret 2,aria-expanded=false). That editor path has not changed since that revision. This environment did not independently reproduce a hang on a fully synchronized ArrowRight / wait / ArrowLeft sequence; the fix targets the coalesced leave described in the issue, not a timeout increase.Browser verification against the official script, including a new rapid leave/re-enter after Escape (no intermediate wait for the outside caret):
The script still covers Escape-without-motion, synchronized leave/re-enter, and the new rapid leave/re-enter on both 图片 and 视频 composers. Python was not re-run; this change is TypeScript editor behavior only.
Left to CI
Official Release checks and the nightly
browser-extendedlane that originally reported the failure.Evidence that it works
reference_picker.mjs, zh-CN, headless) passed, including the rapid leave/re-enter added for [bug] nightly: asset reference picker can stay closed when caret re-enters @ after Escape #394. No screenshots were attached.Provider verification
No live or paid provider calls were made.
Bilingual UI
No user-facing strings changed.