Permalink
Browse files

Continue to handle history.state bug in Firefox 27 - #314

  • Loading branch information...
1 parent 7baa5e9 commit c44aa6a57bbcfcc0838e79c5937fb740fcdbe147 @reed reed committed Jan 24, 2014
Showing with 7 additions and 2 deletions.
  1. +5 −0 CHANGELOG.md
  2. +2 −2 lib/assets/javascripts/turbolinks.js.coffee
View
@@ -8,6 +8,11 @@
*Nick Reed*
+* Extend handling of Firefox [history.state bug](https://bugzilla.mozilla.org/show_bug.cgi?id=949471)
+ through Firefox 27.
+
+ *Nick Reed*
+
## Turbolinks 2.2.0 (January 10, 2014)
* Add transition cache feature. When enabled, cached copies of pages will be shown
@@ -318,9 +318,9 @@ initializeTurbolinks = ->
document.addEventListener 'click', installClickHandlerLast, true
window.addEventListener 'popstate', installHistoryChangeHandler, false
-# Handle bug in Firefox 26 where history.state is initially undefined
+# Handle bug in Firefox 26/27 where history.state is initially undefined
historyStateIsDefined =
- window.history.state != undefined or navigator.userAgent.match /Firefox\/26/
+ window.history.state != undefined or navigator.userAgent.match /Firefox\/2[6|7]/
browserSupportsPushState =
window.history and window.history.pushState and window.history.replaceState and historyStateIsDefined

0 comments on commit c44aa6a

Please sign in to comment.