| Summary: | Focussing doesn't work initially in Examples Demo | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] RAP | Reporter: | RĂ¼diger Herrmann <ruediger.herrmann> | ||||||
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | ||||||||
| Version: | 1.3 | ||||||||
| Target Milestone: | 1.3 M3 | ||||||||
| Hardware: | All | ||||||||
| OS: | All | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
RĂ¼diger Herrmann
It seems that it is not related to the Button widget only. Reproducible with "Input widgets" too. Click on the "Last name" field move the focus to "First name" field. In case of a custom tab list (see WorkbenchPage#updateTabList(IWorkbenchPart)) the -1 is rendered for the control tabIndex property. But in qooxdoo tabIndex = -1 means that the widget can't handle focus at all (mouse and tab) - see Widget.js#isFocusable(). In this case mouse click on a widget (button for example) with tabIndex property set to -1 will lead to wrong focusedControl send by shell (shell is set as focused control instead of button). The solution is the following: 1. Remove check this.getTabIndex() >= 0 from Widget.js#isFocusable(), leave only the check for this.getTabIndex() != null. 2. In all places where the tabIndex is set to -1, set it to null to make the widget unfocusable (mouse and tab). Thus, setting tabIndex to -1 will make the widget focusable by mouse, but not by tab. Affected widgets: - qooxdoo Parent, Window, Spinner and ComboBox (not used by RWT). - all RWT widgets where tabIndex = -1 is used. Created attachment 151117 [details]
Qooxdoo framework patch
Created attachment 151118 [details]
RWT patch
Applied both patches to CVS HEAD. To make the qooxdoo widget completely unfocusable (mouse and tab) set the tabIndex to null. Setting tabIndex to -1 will exclude the widget from tab order, but widget will still be focusable by mouse. |