Skip to content

[GTK] Focus the first or last link when Tab moves the focus into a Link - #3746

Merged
akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:link-tab-traversal
Oct 19, 2026
Merged

akurtakov merged 1 commit into
eclipse-platform:masterfrom
akurtakov:link-tab-traversal

Conversation

@akurtakov

Copy link
Copy Markdown
Member

Link kept the index of the focused link when it lost focus. After Tab moved past the last link, the next Tab into the Link focused the last link again and the following Tab left it, so the other links could no longer be reached with Tab. Shift+Tab never got past the first link.

Focus the first link on Tab and the last link on Shift+Tab.

Link kept the index of the focused link when it lost focus. After Tab
moved past the last link, the next Tab into the Link focused the last
link again and the following Tab left it, so the other links could no
longer be reached with Tab. Shift+Tab never got past the first link.

Focus the first link on Tab and the last link on Shift+Tab.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The narrow change addresses repeated keyboard traversal correctly, with no unresolved findings.

No open issues 🎉

What changed in this PR

Fixes GTK Link keyboard traversal so entering the widget selects the appropriate link.

Changes:

  • Focuses the first link on Tab and the last link on Shift+Tab.
  • Redraws after updating focus while preserving superclass focus-failure handling.
File Description
bundles/​org.eclipse.swt/​Eclipse SWT/​gtk/​org/​eclipse/​swt/​widgets/​Link.java Overrides tab-item focus to select the link based on traversal direction.

Review effort: Balanced

@github-actions

Copy link
Copy Markdown
Contributor

Test Results (linux)

   514 files  ±0     514 suites  ±0   39m 36s ⏱️ +55s
 4 807 tests ±0   4 465 ✅ ±0    342 💤 ±0  0 ❌ ±0 
14 715 runs  ±0  13 333 ✅ ±0  1 382 💤 ±0  0 ❌ ±0 

Results for commit f021e50. ± Comparison against base commit 3af6685.

@akurtakov
akurtakov merged commit 4185d4c into eclipse-platform:master Oct 19, 2026
18 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