Bug 231303 - Browser widget: Tab key traps focus when key listener is added
Summary: Browser widget: Tab key traps focus when key listener is added
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.4 RC1   Edit
Assignee: Grant Gayed CLA
QA Contact:
URL:
Whiteboard:
Keywords: accessibility
Depends on:
Blocks: 231283
  Show dependency tree
 
Reported: 2008-05-09 10:01 EDT by Markus Keller CLA
Modified: 2008-05-09 17:27 EDT (History)
3 users (show)

See Also:
Silenio_Quarti: review+


Attachments
patch (1.55 KB, patch)
2008-05-09 17:26 EDT, Grant Gayed CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2008-05-09 10:01:20 EDT
I20080508-2000

Focus handling in the Browser widget is screwed as soon as I add a key listener (KeyUp or KeyDown) to the Browser.

Steps in ControlExample:
- add key listener
- click into browser, just before the first link
- press Tab to focus first link
- press Shift+Tab
=> should: put focus to the "Browser" TabItem
=> does: first puts you into a state where nothing really has focus (Up/DownArrow keys don't scroll the browser any more). On second press of Shift+Tab, puts focus the last link in the browser.

- click into the "Browser" TabItem
- press Tab
=> should: put focus to the browser
=> does: puts focus into a black hole. There's no way to get the focus back from this state using the Tab key.

I think the problem is that Browser is a subclass of Composite, and adding a key listener to the composite makes it take focus. Even with a key listener, the Browser widget should behave like e.g. a Tree and still correctly implement focus traversal (e.g. by passing focus to the contained WebSite control).
Comment 1 Grant Gayed CLA 2008-05-09 17:26:41 EDT
Created attachment 99573 [details]
patch
Comment 2 Grant Gayed CLA 2008-05-09 17:27:41 EDT
fixed > 0509