Skip to content

fix: keep the overlay caret on the insertion point after key presses - #353

Open
ctate wants to merge 1 commit into
ctate/macos-highlight-bleedfrom
ctate/overlay-caret-after-press
Open

ctate wants to merge 1 commit into
ctate/macos-highlight-bleedfrom
ctate/overlay-caret-after-press

Conversation

@ctate

@ctate ctate commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor
  • Move a caret that is showing to the focused text element's insertion point once press has delivered and the app has settled, or hide it when there is none
  • Add a caret-follow phase to the macOS and Windows renderers that moves or hides the caret, never shows one that is not showing, and leaves a rested overlay asleep
  • Skip the click ripple when type goes to a field that already has keyboard focus, from one focus read made only while the overlay is on

The caret follows arrow keys, then typing resumes in the focused field with no second click.

caret-follows-keys.mp4

@ctate
ctate added this pull request to stack #351 October 31, 2026 00:10
@vercel

vercel Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
agent-desktop Ready Ready Preview, v0 Oct 31, 2026 8:21am UTC

@ctate
ctate marked this pull request as ready for review October 31, 2026 00:42
}
quiet_since = std::time::Instant::now();
if state.resting {
bridge::show();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

press after the overlay rests brings the macOS cursor back. child.rs:93 wakes the overlay for the new caret-follow message too. The caret is already gone, so you get the cursor and bubble back with nothing drawn.

Fix: don't wake the overlay for that message.

@ctate
ctate force-pushed the ctate/overlay-caret-after-press branch from 9607cc3 to 8246a7b Compare October 31, 2026 02:08
@ctate
ctate force-pushed the ctate/overlay-caret-after-press branch from 8246a7b to 2f9b8a2 Compare October 31, 2026 03:49
@ctate
ctate requested a review from lahfir October 31, 2026 04:03
@ctate
ctate force-pushed the ctate/overlay-caret-after-press branch from 2f9b8a2 to 40f2c17 Compare October 31, 2026 04:53
@ctate
ctate force-pushed the ctate/overlay-caret-after-press branch from 40f2c17 to 3dc6a60 Compare October 31, 2026 04:54
@ctate
ctate force-pushed the ctate/overlay-caret-after-press branch from 3dc6a60 to 7af1df8 Compare October 31, 2026 08:03
- Move a caret that is showing to the focused text element's insertion point once `press` has delivered and the app has settled, or hide it when there is none
- Add a caret-follow phase to the macOS and Windows renderers that moves or hides the caret, never shows one that is not showing, and leaves a rested overlay asleep
- Skip the click ripple when `type` goes to a field that already has keyboard focus, from one focus read made only while the overlay is on
@ctate
ctate force-pushed the ctate/overlay-caret-after-press branch from 7af1df8 to e159be5 Compare October 31, 2026 08:20

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants