Bug Tracker

Opened 10 years ago

Closed 10 years ago

#14151 closed bug (invalid)

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:


The following selector will throw an error in real versions of Internet Explorer 7:


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.

Change History (7)

comment:1 Changed 10 years ago by gibson042

Owner: set to spudly
Status: newpending

Works for me: http://jsfiddle.net/BG5aT/2/show/

Please modify that test case (or provide another) to demonstrate the error.

comment:2 Changed 10 years ago by anonymous

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:



(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.

comment:4 Changed 10 years ago by dmethvin

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.

Last edited 10 years ago by dmethvin (previous) (diff)

comment:5 Changed 10 years ago by dmethvin

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.

comment:6 Changed 10 years ago by spudly <[email protected]…>

@dmethvin, agreed. I would never actually use that selector. I just put it in the ticket that way to illustrate the problem.

comment:7 Changed 10 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

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!

Note: See TracTickets for help on using tickets.