Skip to content

macOS: fix focus update when using search or command palette - #11978

Merged
mitchellh merged 2 commits into
ghostty-org:mainfrom
bo2themax:whoisthere-0
Mar 30, 2026
Merged

mitchellh merged 2 commits into
ghostty-org:mainfrom
bo2themax:whoisthere-0

Conversation

@bo2themax

@bo2themax bo2themax commented Mar 30, 2026 •

Copy link
Copy Markdown
Member

This fixes two things:

  1. Surface focus state is not consistent with first responder state when the search bar is open.

Reproduce: Open search, switch to another app and back, observe the cursor state of the surface.
And after switching back, cmd+shift+f will close the search bar, surface will become focused but not first responder, so it will not accept any input

  1. Command palette is not focused when built with Xcode 26.4 (26.3 works fine).

This is weird to me, because the tip (and built with 26.3) works fine. I guess it's related to the SDK update? I couldn’t be sure what went wrong, but dispatching it to the next loop works as previously.
Also cleaned some previous checks when quickly open and reopen.
This fix works great both with 26.4 and 26.3

Screen.Recording.2026-03-29.at.17.55.43.mp4

This will fix surface focus state is not consistent with first responder state when the search bar is open
…26.4

Tip works fine, but I've tried release and debug build with Xcode 26.4, it failed to focus as expected
@bo2themax
bo2themax requested a review from a team as a code owner March 30, 2026 09:20
@ghostty-bot ghostty-bot Bot added the os/macos label Mar 30, 2026
Comment thread macos/Sources/Features/Command Palette/CommandPalette.swift
@mitchellh mitchellh added this to the 1.3.2 milestone Mar 30, 2026
@mitchellh
mitchellh merged commit bf3f9b3 into ghostty-org:main Mar 30, 2026
86 checks passed
@bo2themax
bo2themax deleted the whoisthere-0 branch March 30, 2026 16:29
@mitchellh mitchellh modified the milestones: 1.3.2, 1.4.0 Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants