Skip to content

Move focus backwards on Shift+Tab - #617

Merged
nicoburns merged 1 commit into
DioxusLabs:mainfrom
maurerdietmar:shift-tab-focus
Aug 5, 2026
Merged

Move focus backwards on Shift+Tab#617
nicoburns merged 1 commit into
DioxusLabs:mainfrom
maurerdietmar:shift-tab-focus

Conversation

@maurerdietmar

@maurerdietmar maurerdietmar commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

The Tab handler always called focus_next_node, so Shift+Tab moved focus forwards like a plain Tab and there was no way to reach the previous control from the keyboard.

Add prev_node, the reverse-document-order mirror of next_node (step to the deepest last descendant of the preceding sibling, or up to the parent, wrapping around at the start of the document), expose it as focus_prev_node, and dispatch to it when the shift modifier is set.

WPT results

No changes in test results compared to main.

Generated by the WPT workflow.

The Tab handler always called focus_next_node, so Shift+Tab moved
focus forwards like a plain Tab and there was no way to reach the
previous control from the keyboard.

Add prev_node, the reverse-document-order mirror of next_node (step
to the deepest last descendant of the preceding sibling, or up to the
parent, wrapping around at the start of the document), expose it as
focus_prev_node, and dispatch to it when the shift modifier is set.

Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
@nicoburns
nicoburns enabled auto-merge (squash) August 5, 2026 15:45
@nicoburns
nicoburns merged commit d788124 into DioxusLabs:main Aug 5, 2026
15 checks passed
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