Repository navigation
fix(renderer): restore focus after ordinary toast removal - #912
Merged
Merged
Conversation
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.
Focused ordinary notification dismiss buttons disappear when the user dismisses the toast, its timer expires, or the stack evicts it. Keyboard focus then falls to the document body. Capture focus before the store-driven DOM update and restore the existing Alerts button only when that focused control was removed and focus remains on the body. Focus moved elsewhere and sensitive-banner behavior remain intact.
Verification: the pre-fix component reproduction failed on manual dismiss and expiry; 4 focused regression cases plus 7 existing sensitive-banner cases pass. Root typecheck, Svelte checks, scoped lint/format and diff check pass. Independent GPT-6.1 Sol review found no P1/P2 issue, including after rebase to current master; Git line-ending normalization caused the test working-tree SHA change without changing content. Hosted CI provides the broad required checks. Native Electron keyboard behavior is not claimed from these component tests.