Ticket #2530506 (closed defect)

Reporter


Andrew Wooldridge
Opened: 07/7/11
Last modified: 08/18/11
Status: closed
Type: defect
Resolution: fixed

Owner


Ryan Grove
Target Release: 3.4.0
Priority: P2 (high)
Summary: Chrome fires multiple popstate events + race condition with two concurrent .save()'s
Description:

It has to do with pushState() being called in the head.

from IRC:
rgrove Chrome's popstate behavior does differ from other browsers, but this is a new wrinkle I hadn't seen before. Hmm.
rgrove Actually, the bug occurs with the code in the body too, but not if you wait until after window.onload.
rgrove Basically if you call pushState before the first popstate event for the pageview (and Chrome always fires one, whereas other browsers only fire for pushState pageviews), then the bug occurs.

part 2:
Race condition.
rgrove The popstate event doesn't actually include any information on the new URL, so we have to manually inspect window.location to figure out what the URL has changed to. Unfortunately,
window.location isn't guaranteed to be updated before popstate fires, so we have to use an async timeout to inspect the location *after* the popstate event (and everything else in the event queue) are
finished...

Ref url http://jsfiddle.net/triptych/zpLNe/

Type: defect Observed in Version: 3.4.0 PR2
Component: App Framework Severity: S2 (high)
Assigned To: Ryan Grove Target Release: 3.4.0
Location: Library Code Priority: P2 (high)
Tags: Relates To:
Browsers: Chrome
URL: http://jsfiddle.net/triptych/zpLNe/
Test Information:

Change History

Ryan Grove

YUI Developer

Posted: 07/8/11
  • location changed to Library Code
  • milestone changed to 3.4.0
  • priority changed to P2 (high)
  • severity changed from S3 (normal) to S2 (high)
  • status changed from new to accepted

Ryan Grove

YUI Developer

Posted: 07/8/11
  • estimated changed from 0 to 0.5
  • remaining changed from 0 to 0.5
  • sprint changed to sprint 3

Ryan Grove

YUI Developer

Posted: 07/8/11
  • completed changed from 0 to 0.5
  • status changed from accepted to checkedin

Fixed in 5125fb96.

George

YUI Developer

Posted: 08/18/11
  • resolution changed to fixed
  • status changed from checkedin to closed