Bug 16191 - REGRESSION: cannot tab to radio input after setting checked to false
Summary: REGRESSION: cannot tab to radio input after setting checked to false
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 523.x (Safari 3)
Hardware: All All
: P1 Major
Assignee: Darin Adler
Depends on:
Reported: 2007-11-29 09:42 PST by Brian
Modified: 2007-11-29 16:54 PST (History)
0 users

See Also:

example page (1.50 KB, text/html)
2007-11-29 09:44 PST, Brian
no flags Details
patch (5.62 KB, patch)
2007-11-29 16:42 PST, Darin Adler
adele: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian 2007-11-29 09:42:33 PST
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<title>Safari v3 bug</title>


Bug: cannot tab to checked false radio input

Safari v3.0.4 (523.12.9) Windows XP
Safari v3.0.4 (523.12) Mac OS X 10.4.11

To reproduce:
Press TAB to cycle through radio inputs.
Select one radio with SPACE or mouse click.
Continue to press TAB.
Notice TAB will now skip the input.

checked false inputs with unique IDs should
always be in the TAB sequence.

works as expected in Safari v2.0.4. and
current versions of Opera, Firefox, and IE.


<script language="JavaScript" type="text/javascript">

function initFocus() {

var myInputs = document.getElementsByTagName('INPUT');
for (var i=0; i<myInputs.length; i++) {


	var myFieldset = this.parentNode.parentNode;
	var myInputs = myFieldset.getElementsByTagName('INPUT');
	for (var i=0; i<myInputs.length; i++) {

<body onload="initFocus();">
<form action="">

	<fieldset style="margin-left:1em;border:0">
	<input type="radio" name="input-p1q1-1" />answer1<br />
	<input type="radio" name="input-p1q1-2" />answer2<br />
	<input type="radio" name="input-p1q1-3" />answer3<br />
	<input type="radio" name="input-p1q1-4" />answer4<br />

Comment 1 Brian 2007-11-29 09:44:04 PST
Created attachment 17594 [details]
example page
Comment 2 Darin Adler 2007-11-29 13:06:43 PST
I'll take care of this. It's a bug in HTMLInputElement::setChecked when the new value is false.
Comment 3 Darin Adler 2007-11-29 16:42:15 PST
Created attachment 17598 [details]
Comment 4 Darin Adler 2007-11-29 16:54:19 PST
Committed revision 28212.