Details
-
Type: Bug
-
Status: Closed
-
Priority: Minor
-
Resolution: Invalid
-
Affects Version/s: 1.8RC1
-
Component/s: ICE-Components
-
Labels:None
-
Environment:IE, selectOneRadio or selectManyCheckbox with spread=true.
Description
On IE only, when selecting a radio button or checkbox that is in spread layout, the focus is lost on the component.
To reproduce:
1. Run the regression test app. for
2. Use the tab key to move focus to the radio button or checkbox controls at the top of the page.
3. Use the space bar key to select the focussed component. Notice how the focus indicator is no longer around the component.
4. Press tab again, and focus appears to be returned to the original component again. Strange...
Issue Links
- depends on
-
ICE-3720 IE loses focus when tabbing goes beyond currently visible area of screen
- Closed
This has nothing to do with spread = true or not. The component showcase example has the same behavior without using spread. The focus hasn't been lost. It has been passed from the label to the radio button or checkbox itself.
This is actually the intended behavior specified by W3C. We use the <label for="..."> to specify the label so that users can click on the label to change the state. The click is actually passed through to the radio button or checkbox. The same thing happens with focus. According to the HTML spec:
"When a LABEL element receives focus, it passes the focus on to its associated control."
I have tried adding the onfocus event handling to the label like other controls. Didn't seem to work. The onfocus event didn't seem to be recognized at all by the label.