Bug Tracker

Opened 8 years ago

Closed 8 years ago

Last modified 6 years ago

#9090 closed bug (invalid)

IE9 - Date is undefined in ready()

Reported by: paddyboyd1 Owned by: paddyboyd1
Priority: undecided Milestone: 1.next
Component: unfiled Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:

Description

Please note that this is the same bug as reported in ticket 8779, which as since been closed, as the user found a workaround.

I'm raising this, as I'm not sure that this should not be fixed in the jQuery script, as it does not occur in most other browsers.

The issue I had:

  1. Page with scripts that have $(document).ready() functions bound.
  1. That page was being opened in a lightwindow.
  1. On click of a button in the lightwindow, it was posting, and then on return, a script was running to close the lightwindow.
  1. The error received is that 'jQuery' is undefined, from within one of my ready events. It seems that the document had been removed from the DOM prior to the event running.

After a bit more digging, it stems from this line (in the minified version):

function J(){return(new Date).getTime()}

which is called in the ready function - Date is undefined in IE9 at this point (as the document has been removed).

Now, I can workaround this by getting my lightwindow closing script to run in the jQuery(window).load() event - but this was a little hard to track down, and it may be of benefit to others if this failed gracefully in this scenario.

As mentioned in 8779, this applied to both 1.4.4 and 1.5.2.

Change History (4)

comment:1 Changed 8 years ago by addyosmani

Owner: set to paddyboyd1
Status: newpending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket!

Additionally, test against the jQuery (edge) version to ensure the issue still exists.

comment:2 Changed 8 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!

comment:3 Changed 6 years ago by anonymous

Hi, I faced same issue in IE9 that is Date is undefined error, so what is workaround for this issue.

Thanks.

comment:4 in reply to:  3 Changed 6 years ago by anonymous

Replying to anonymous:

Hi, I faced same issue in IE9 that is Date is undefined error, so what is workaround for this issue.

Thanks.

Hi, i can't understand "I can workaround this by getting my lightwindow closing script to run in the jQuery(window).load() event ", where can i put closing script into?

THX.

Note: See TracTickets for help on using tickets.