Skip to main content

Bug Tracker

Side navigation

#6027 closed bug (worksforme)

Opened February 04, 2010 02:03PM UTC

Closed June 14, 2010 12:57AM UTC

onbeforeunload breaks events in Chrome 4

Reported by: menno Owned by:
Priority: major Milestone: 1.4.2
Component: unfiled Version: 1.4.1
Keywords: Cc:
Blocked by: Blocking:
Description

Steps to reproduce:

  • create a page with an onbeforeunload event
  • try to reload/close the page and see the browser dialog appear
  • choose to stay on the page

Expected result:

All events are still attached to their DOM elements.

Actual result:

No events are being fired anymore.

The problem appears to be "return (new Date).getTime()" in the function now() which doesn't return anything valid anymore after the canceled reload. If I change the function to return "(new Date).valueOf()" it seems to fix the problem.

See the attached HTML for a testcase.

Attachments (1)
  • bug.html (1.5 KB) - added by menno February 04, 2010 02:03PM UTC.

    testcase

Change History (3)

Changed February 04, 2010 03:57PM UTC by menno comment:1

Since the bug is originally caused by Chrome's faulty new Date().getTime() I've created a bug in Chromium's tracking system as well:

http://code.google.com/p/chromium/issues/detail?id=33441

Changed June 04, 2010 08:52AM UTC by svcorp77 comment:2

Chrome 5.0.375.70 beta: fixed

Changed June 14, 2010 12:57AM UTC by dmethvin comment:3

resolution: → worksforme
status: newclosed

Sounds like this was not a jQuery bug, and now that the Chrome bug is fixed I'll close this ticket.