Side navigation
#6776 closed enhancement (invalid)
Opened July 08, 2010 02:47PM UTC
Closed October 31, 2010 08:42AM UTC
.attr issue with readonly and disable
| Reported by: | DamianHall | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | 1.4.3 |
| Component: | css | Version: | 1.4.2 |
| Keywords: | attributes, css, selectors | Cc: | |
| Blocked by: | Blocking: |
Description
I noticed while working on a project that used a css selector input[readonly="readonly"] that for both readonly and disabled, the .attr function does not properly update the DOM. It puts in readonly="" and disabled="" instead of an actual value. I don't know if this was done intentionally or not, but I thought I'd bring it to the attention of the developers.
Functionally it works correctly, it's only in the case if a developer is trying to use the readonly="readonly" selector where it becomes an issue.
Attachments (0)
Change History (2)
Changed July 11, 2010 05:57PM UTC by comment:1
| component: | manipulation → css |
|---|
Changed October 31, 2010 08:42AM UTC by comment:2
| priority: | → undecided |
|---|---|
| resolution: | → invalid |
| status: | new → closed |
In HTML, the mere presence of an attribute is what determines whether or not it is set. The correct way to query for a readonly or disabled element is simply input[readonly] or input[disabled].