Bug Tracker

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#12321 closed bug (invalid)

Error: Object doesn't support property or method if Object.prototype.extend is set and Quirks mode is used

Reported by: timb Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.0
Keywords: Cc:
Blocked by: Blocking:

Description

If you set Object.prototype.extend, certain jQuery functions will throw an exception. I have reproduced this with IE8 and IE9 when running in Quirks mode. This is new to 1.8.0.

Here is a jsFiddle that should allow you to reproduce the issue: http://jsfiddle.net/eGwNw/

It doesn't appear that jsFiddle allows you to use a doctype that will force quirks mode, so here's what you need to do:

  1. Open the link in IE8 or IE9.
  2. Press F12 to open the IE debugger.
  3. Change Document Mode to Quirks Mode (you will get some errors from the jsFiddle site, as it's not meant to be run in Quirks Mode - just ignore them for now).
  4. Press the Run button. You should get the error.

If you switch to jQuery 1.7.2 and run it, you will see that the issue no longer occurs.

Please note that older versions of Visual Studio (such as 2003) had the following default doctype: <!DOCTYPE HTML PUBLIC "-W3CDTD HTML 4.0 TransitionalEN">

See here for more info: http://aspnetresources.com/articles/doctype

When 4.0 Transitional is used and the system identifier has not be specified, it will force most (or all?) browser to use Quirks Mode (source: http://en.wikipedia.org/wiki/Quirks_mode). The same occurs if 4.01 transitional is used without the system identifier. Therefore, there may be a number of legacy applications out there that would be impacted by this breaking change if they were to use jQuery 1.8.0.

Change History (3)

comment:1 Changed 7 years ago by timmywil

Resolution: invalid
Status: newclosed

jQuery does not support changing native prototypes or quirksmode.

comment:2 Changed 7 years ago by timb

I apologize for reporting this. I wasn't aware that jQuery does not support changing native prototypes or quirksmode (although I can completely understand why it wouldn't).

I just did a search for this and found the following: http://docs.jquery.com/Won't_Fix.

I checked the bug reporting guidelines, but I did not see any link to this. I recommend that a link to the Won't Fix page be put on the New Ticket page or on the bug reporting guidelines page to help prevent this from happening again in the future.

comment:3 Changed 7 years ago by dmethvin

Good point, we should have the wontfix links in the reporting page. Thanks!

Note: See TracTickets for help on using tickets.