Opened 12 years ago
Closed 12 years ago
#9269 closed bug (invalid)
$.attr bug in IE
Reported by: | Owned by: | timmywil | |
---|---|---|---|
Priority: | low | Milestone: | 1.next |
Component: | attributes | Version: | 1.6.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Guys, we found there is a bug of $.attr in IE. you can duplicate it as below test case:
or you can test it directly from:
http://www.jslab.org.cn/?tag=JQueryAttrBugInIE
When we set a boolean value(true) via $.attr, and then we compare(===) the value that get from $.attr again with true, it will be failured.
Change History (2)
comment:1 Changed 12 years ago by
Component: | unfiled → attributes |
---|---|
Owner: | set to timmywil |
Status: | new → assigned |
comment:2 Changed 12 years ago by
Priority: | undecided → low |
---|---|
Resolution: | → invalid |
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
It has never been the case that you could compare the return values with strict equal to true or false. You can do
getAttribute will not consistently return a boolean either because you can only set attributes to strings. I look at your fiddle in Chrome and see that getAttribute returns a string (as it should). If you get back a boolean, it's a browser bug. jQuery normalizes all of them to a strings.