Skip to content

Commit 2f32d54

Browse files
committed
Merge pull request #273 from defunkt/ff-initial-pop
Fix initial pop in FF
2 parents 0d7e75e + f70e15c commit 2f32d54

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

jquery.pjax.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,11 @@ if (initialState && initialState.container) {
371371
pjax.state = initialState
372372
}
373373

374+
// Non-webkit browsers don't fire an initial popstate event
375+
if ('state' in window.history) {
376+
initialPop = false
377+
}
378+
374379
// popstate handler takes care of the back and forward buttons
375380
//
376381
// You probably shouldn't use pjax on pages with other pushState

0 commit comments

Comments
 (0)