Skip to content

macOS: fix focus state when toggling command palette from inline title editor - #12524

Merged
mitchellh merged 1 commit into
ghostty-org:mainfrom
bo2themax:command-palette
Apr 30, 2026
Merged

mitchellh merged 1 commit into
ghostty-org:mainfrom
bo2themax:command-palette

Conversation

@bo2themax

@bo2themax bo2themax commented Apr 29, 2026 •

Copy link
Copy Markdown
Member

A bug found while recording that menu fix.

Will link to an open issue if there is one.

When toggling the command palette from the inline title editor, the first responder state of the surface is changed quickly from true to false.

makeFirstResponder: is called by the title editor when finishing, but it happens after the command palette is shown, so the focused is set to true while the command palette is shown. (Could be an AppKit issue as well, since the resign is not called after but the command palette is receiving keyDown.)

Since performKeyEquivalent(with:) is called on all of the subviews until one of the return true so the paste action is consumed by the surface instead of the first responder (command palette).

@bo2themax
bo2themax requested a review from a team as a code owner April 29, 2026 20:41
@ghostty-bot ghostty-bot Bot added the os/macos label Apr 29, 2026
@mitchellh mitchellh added this to the 1.4.0 milestone Apr 30, 2026
@mitchellh
mitchellh merged commit 95b56eb into ghostty-org:main Apr 30, 2026
91 checks passed
@bo2themax
bo2themax deleted the command-palette branch April 30, 2026 14:53
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