Skip to content

fix: focus and select the save dialog name without AppKit responder tricks - #92

Merged
rvanbaalen merged 2 commits into
mainfrom
fix/issue-86
Sep 12, 2026
Merged

rvanbaalen merged 2 commits into
mainfrom
fix/issue-86

Conversation

@rvanbaalen

@rvanbaalen rvanbaalen commented Sep 12, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #86

What changed

  1. SaveDialog focuses the name field by setting @FocusState from a .task modifier, which runs once the field is attached.
  2. The DispatchQueue.main.async focus flip is gone.
  3. The NSApp.keyWindow?.firstResponder as? NSTextView select-all walk is gone; macOS selects all text when a text field receives focus programmatically.
  4. import AppKit is removed from SpreadPaper/Views/SaveDialog.swift.
  5. name state is seeded in init so focus never lands on an empty field; docblocks added.

Why

Selection depended on the dialog being in the key window with the text view already first responder when the async block ran; with the Settings window in front nothing was selected and nothing reported it.

Verify

  1. Open a preset and click Save.
  2. The name is selected; typing replaces it.
  3. Enter saves.
  4. Escape cancels.
  5. Repeat with the Settings window open in front.

Tests: 80 green

@rvanbaalen rvanbaalen changed the title Focus and select the save dialog name without AppKit responder tricks fix: focus and select the save dialog name without AppKit responder tricks Sep 12, 2026
…ricks

Focus the name field through @focusstate from a .task modifier and drop the NSApp.keyWindow first-responder walk; macOS selects all text when a text field receives focus programmatically.

Closes #86
@rvanbaalen
rvanbaalen merged commit fc4a33b into main Sep 12, 2026
@rvanbaalen
rvanbaalen deleted the fix/issue-86 branch September 12, 2026 04:40
rvanbaalen pushed a commit that referenced this pull request Sep 13, 2026
🤖 I have created a release *beep* *boop*
---


##
[1.9.0](v1.8.0...v1.9.0)
(2026-09-13)


### Features

* crossfade day and night photos in the Light & Dark hero
([#121](#121))
([f785c1f](f785c1f))
* cycle the Dynamic hero through a day of photographs
([#124](#124))
([33d0367](33d0367))
* import wallpapers saved by earlier versions
([#113](#113))
([0894dd8](0894dd8))
* new app icon
([#99](#99))
([a4ba884](a4ba884))
* rebuild Settings as a native macOS settings window
([#71](#71))
([c6f1e2a](c6f1e2a))


### Bug Fixes

* close the blind spots in the user-facing copy guard
([#127](#127))
([a4225bb](a4225bb))
* fill the gallery in as thumbnails arrive
([#135](#135))
([a59a3db](a59a3db))
* focus and select the save dialog name without AppKit responder tricks
([#92](#92))
([fc4a33b](fc4a33b))
* harden the update checker against HTTP errors, odd tags and
prereleases
([#96](#96))
([0db734d](0db734d))
* keep the renders other desktops still point at
([#136](#136))
([6ee6e4b](6ee6e4b))
* make drag and drop work in the wizard and editor
([#77](#77))
([b757c00](b757c00))
* pick a schedule start time from short hour and minute menus
([#130](#130))
([a1944c3](a1944c3))
* request read-only access to user-selected files
([#104](#104))
([ddaeb91](ddaeb91)),
closes [#98](#98)
* restore hover on the editor header and canvas HUD buttons
([#133](#133))
([b85273c](b85273c))
* restore the New Wallpaper heading
([#128](#128))
([75d03e9](75d03e9))
* show one image spread across the hero monitors
([#119](#119))
([1d80dfd](1d80dfd))
* stop the skeleton shimmer leaking into the search field
([#68](#68))
([9424209](9424209))
* tighten the onboarding copy and its wrapping
([#125](#125))
([56e7dd9](56e7dd9))
* tint Phosphor glyphs by template rendering so icons draw
([#117](#117))
([0a6e92b](0a6e92b))
* write dynamic HEIC files straight to disk and report count mismatches
([#91](#91))
([6c230c2](6c230c2))
* write dynamic wallpapers to a new file per apply so macOS reloads them
([#105](#105))
([864c0db](864c0db))


### Performance Improvements

* build gallery thumbnails with ImageIO downsampling
([#79](#79))
([1c48c7f](1c48c7f))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Save dialog selects the name field through AppKit responder-chain timing

1 participant