Repository navigation
fix(native): restore key window after modal panels - #431
Closed
tiensonqin wants to merge 2 commits into
Closed
tiensonqin wants to merge 2 commits into
tiensonqin wants to merge 2 commits into
Conversation
Contributor
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
Contributor
There was a problem hiding this comment.
Devin Review found 1 finding. Devin automatically fixed it.
Fixed by Devin (1)
- Main window overrides existing keyboard focus — Preserve an already eligible restored key window first, falling back to main/first only when the key window is absent, the closing panel, invisible, or cannot become key.
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.
Summary
Fix keyboard-focus restoration after native macOS
NSOpenPanel/NSSavePanelmodal sessions. Previously the SDL host window could continue drawing a focused caret while the application itself remained inactive, so real keyboard input was dropped until the user clicked the window. After the modal session ends, the shell now explicitly reactivates the application and restores a visible key-capable non-panel window as key, for both accepted and cancelled panels.docs/api-migrations.mdrecords the behavior change; hosts require no source migration.Validation
Real macOS SDL/Metal validation passed against this executable change in the Logseq native host. Primary acceptance: 0.5s after choosing a directory in the real macOS
NSOpenPanel, typingnoclickwithout clicking landed in the visibly focusedNew graph nameinput.Host evidence shows real key delivery and text mutation:
Regression/comparison checks:
t/lvisibly toggled the sidebar.Link to Devin session: https://app.devin.ai/sessions/4db1c451562249ac8356dbf66216a01b
Open in Devin Desktop: https://app.devin.ai/desktop/session/4db1c451562249ac8356dbf66216a01b?variant=devin
Requested by: @tiensonqin
🟢 Devin fixed the finding · Follow Devin's work