Skip to content

Fix restoreFocus when focus is lost on an element with a numeric id#127

Merged
botandrose merged 2 commits intomainfrom
fix-restore-focus-numeric-id
Feb 27, 2025
Merged

Fix restoreFocus when focus is lost on an element with a numeric id#127
botandrose merged 2 commits intomainfrom
fix-restore-focus-numeric-id

Conversation

@botandrose
Copy link
Collaborator

Following up on #125, I found another place in the code where we were assuming that it was safe to prepend # to an ID and have a valid CSS selector: the focus restoration code.

First commit is a failing test to expose the issue, and the second is the same fix as applied in #125.

@botandrose botandrose merged commit d3915b1 into main Feb 27, 2025
12 checks passed
@botandrose botandrose deleted the fix-restore-focus-numeric-id branch February 27, 2025 16:23
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.

2 participants