Closed Bug 60205 Opened 24 years ago Closed 24 years ago

First radio option selected when no default in HTML

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED INVALID

People

(Reporter: djp, Assigned: rods)

References

()

Details

From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux 2.2.13 i686; en-US; m18) Gecko/20001115 BuildID: 2000111508 My form relies on the user actively selecting one of two radio options (YES or NO). Unfortunately Mozilla differs from Netscape/M$E in auto-selecting the first option. I need the user and not Mozilla to actively do this. If I want a default I can include one in the HTML Reproducible: Always Steps to Reproduce: 1. View the page 2. 3.
This only happens in strict mode (i.e. for XHTML, HTML 4.0 Strict, and HTML 4.0 Transitional with DTD). In quirks mode (any other doctype) neither radio button is selected. This bug is invalid for reasons explained below: The w3c spec (at http://www.w3.org/TR/html4/interact/forms.html#radio) quotes from the HTML RFC (RFC 1866): "At all times, exactly one of the radio buttons in a set is checked. If none of the <INPUT> elements of a set of radio buttons specifies `CHECKED', then the user agent must check the first radio button of the set initially." The spec furthermore says that no current user agent actually follows the RFC and that user agent behavior differs and therefore: "authors should ensure that in each set of radio buttons that one is initially 'on'." So Mozilla is rendering the document per spec in strict mode (your page is XHTML 1.0) and rendering compatibly with other browsers and NS 4.x in quirks mode. This is exactly what Mozilla's behavior should be. I would suggest either rewriting the page to not depend on the radio buttons not being selected or changing the doctype to a quirks doctype.
Status: UNCONFIRMED → RESOLVED
Closed: 24 years ago
Resolution: --- → INVALID
verifying invalid
Status: RESOLVED → VERIFIED
*** Bug 85089 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.