Skip to main content

Bug Tracker

Side navigation

#7257 closed bug (duplicate)

Opened October 20, 2010 10:16AM UTC

Closed October 20, 2010 05:05PM UTC

Last modified October 20, 2010 05:05PM UTC

.attr('checked') does not work as expected for application/xhtml+xml documents

Reported by: kieran@menor.dk Owned by:
Priority: undecided Milestone: 1.5
Component: unfiled Version: 1.4.3
Keywords: Cc:
Blocked by: Blocking:
Description

It is impossible to use .attr('checked') to read and modify checkbox states for documents that have the application/xhtml+xml content type. Instead, it returns "checked" or "undefined" depending on whether the checked="checked" attribute is specified for the tag. A boolean true/false was expected.

If the document is sent as text/html, it works as expected.

I have tested it in both Firefox and Google Chrome with the same result.

Example: http://caffie.net/checkbox/index.xhtml

Attachments (0)
Change History (3)

Changed October 20, 2010 03:39PM UTC by anonymous comment:1

Changed October 20, 2010 05:05PM UTC by dmethvin comment:2

resolution: → duplicate
status: newclosed

The true/false magic for .checked is a DOM1 HTML behavior and not supported in XHTML.

Dup of #4283 where it is discussed ad nauseum.

Changed October 20, 2010 05:05PM UTC by dmethvin comment:3

Duplicate of #4283.