Side navigation
#14151 closed bug (invalid)
Opened July 18, 2013 07:23PM UTC
Closed August 03, 2013 08:35AM UTC
IE7: [type="anything"] selector throws "Object doesn't support this property or method"
Reported by: | spudly | Owned by: | spudly |
---|---|---|---|
Priority: | undecided | Milestone: | None |
Component: | unfiled | Version: | 1.10.2 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
The following selector will throw an error in real versions of Internet Explorer 7:
$('[type="something"]');
It throws this error: Object doesn't support this property or method
with no file or line information to tell you where it came from.
This happens in a real version of IE7 only! It cannot be reproduced in ie7 browser mode or ie7 document mode. I had to download microsoft's ie7 virtual machine image in order to debug this.
Works fine in 1.9.1. Broken in both 1.10.1 and 1.10.2.
This seems to be related to Ticket #13974, but the fix for that ticket did not fix this issue.
Attachments (0)
Change History (7)
Changed July 18, 2013 07:47PM UTC by comment:1
owner: | → spudly |
---|---|
status: | new → pending |
Changed July 19, 2013 03:08PM UTC by comment:2
Well, after hours of debugging, I finally got jsfiddle to show the error. Looks like it's not a jQuery bug because it only happens if you also include amplify.js
. They must be doing something evil that interferes with the jquery/sizzle selectors.
If interested, here's the updated test case that shows the error:
http://jsfiddle.net/BG5aT/12/show/
(remember, it only fails in a real, actual, non-compatibility-mode version of ie7)
Recommend closing the ticket. I'll report it on amplify.js
's issue tracker.
Changed July 19, 2013 03:23PM UTC by comment:3
Changed July 19, 2013 03:51PM UTC by comment:4
_comment0: | It has something to do with the #userdata element added by amplify in the head: http://bugs.jquery.com/ticket/14151 \ \ However, I confirmed that the element has a `.getAttribute()` method and `.getAttribute("id")` returns `null` as it should. That's as far as I've gotten in troubleshooting. → 1374249354353751 |
---|
It has something to do with the #userdata element added by amplify in the head: http://jsfiddle.net/BG5aT/14/
However, I confirmed that the element has a .getAttribute()
method and .getAttribute("id")
returns null
as it should. That's as far as I've gotten in troubleshooting.
Changed July 19, 2013 04:02PM UTC by comment:5
I also just want to point out what a horrible selector that is, since it's equivalent to *[type=anything]
and means Sizzle will need to examine every element in JavaScript to see if it has anything
as its type
. Only a handful of HTML elements have a defined type
attribute, so the selection should be qualified by a tag name or class.
Changed July 19, 2013 05:20PM UTC by comment:6
@dmethvin, agreed. I would never actually use that selector. I just put it in the ticket that way to illustrate the problem.
Changed August 03, 2013 08:35AM UTC by comment:7
resolution: | → invalid |
---|---|
status: | pending → closed |
Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!
Works for me: http://jsfiddle.net/BG5aT/2/show/
Please modify that test case (or provide another) to demonstrate the error.