Repository navigation
native2: describe out-of-process Open panels accurately (#200) - #219
Merged
Merged
Conversation
iamnbutler
force-pushed
the
fix-open-panel
branch
from
October 25, 2026 00:13
bc4396e to
c1237fd
Compare
A sandboxed app's Open panel is drawn by the open and save panel service. Its own windows (the panel's proxy and sheets such as Go to Folder) were listed as off screen or limited, with hints to focus them; they're now open_save_panel_service, pointing at the app's panel window. Keys into the panel, which the service holds and background events don't reach, are refused with how to click it or enter a path instead. Adds a recipe. Why: native2/Sources/DesktopMac/Keyboard.swift#fn requireKeyboardFocus | a sandboxed Open panel reports no AXFocusedUIElement for its app, and keys posted to the app or the panel service pid don't reach it in the background (checked live); background clicks do work
iamnbutler
force-pushed
the
fix-open-panel
branch
from
October 25, 2026 00:41
c1237fd to
7fd3737
Compare
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.
Fixes #200
Investigated with a sandboxed test app whose NSOpenPanel is drawn by
com.apple.appkit.xpc.openAndSavePanelService:desktop_inspect,desktop_dialogand backgrounddesktop_clickwork there; clicking the Downloads sidebar row in the background changed the folder.limited / no_matching_accessibility_window.AXFocusedUIElement; the service holds focus only while active. Posting ⇧⌘G to the app pid or the service pid in the background does nothing (tried both), so background keys aren't feasible.Changes:
open_save_panel_servicewith a hint to use the app's panel window anddesktop_dialog_answerpath, instead of "not on screen, bring it forward".desktop_dialog_answer), not the generic focus refusal.Not done: the issue's one-off "no usable Accessibility elements" after a click didn't reproduce on a standalone panel; it looks like a transient read while the panel reloaded. A 200-element inspect of the panel is mostly sidebar; #178 (#212) defers its offscreen rows. I didn't run
desktop_dialog_answer pathlive because it's foreground and would take the keyboard focus; the recipe follows its code.swift testpasses (new Availability case); smoked on the dev app (native2).