Skip to main content

Bug Tracker

Side navigation

#9129 closed bug (fixed)

Opened May 05, 2011 04:07PM UTC

Closed May 05, 2011 04:52PM UTC

Last modified March 08, 2012 08:11PM UTC

jQuery does not support enumerated attributes such as contenteditable

Reported by: timmywil Owned by: timmywil
Priority: blocker Milestone: 1.6.1
Component: attributes Version: 1.6
Keywords: Cc:
Blocked by: Blocking:
Description

http://www.w3.org/TR/2008/WD-html5-20080610/semantics.html#enumerated

I see no way around creating a regex of boolean attributes which are boolean by spec so that we do not interfere with enumerated attributes. The properties for enumerated attributes should actually be "true", "false", and "" (instead of same name, existent, empty string, and removed as in boolean attributes) and we can make this easy for our users with a regex.

The regex is also required when setting html5 boolean attributes, where those corresponding properties are undefined in browsers that do not support html5, so the boolean property check fails (for instance autofocus).

#9123 is related.

I think this will make things much simpler and true to spec, and actually be faster (once the regex is built).

Attachments (0)
Change History (3)

Changed May 05, 2011 04:08PM UTC by timmywil comment:1

component: unfiledattributes
milestone: 1.next1.6.1
owner: → timmywil
priority: undecidedblocker
status: newassigned

Changed May 05, 2011 04:52PM UTC by timmywil comment:2

resolution: → fixed
status: assignedclosed

Construct boolHook and rboolean regex to deal with boolean attributes. Fixes #9129. Fixes #9123.

  • Construct regex for all attributes which are boolean attributes by specification.

+ This allows us to do what users expect with enumerated attributes and allows us to no longer complicate the issue.

+ People are just too confused with passing "true" instead of true when they should, so we won't have to worry about that anymore.

  • Modularize code for dealing with boolean attributes into a separate hook to keep attr short and fast.

Changeset: 5097e6d1c672ef5fd3fcc0022ce84519233189cc

Changed May 07, 2011 08:07PM UTC by timmywil comment:3

#9105 is a duplicate of this ticket.