Skip to content

Commit 54a3d79

Browse files
author
Gabriel Schulhof
committed
Support: Turn off pushState inside FF iframes
1 parent 1294caa commit 54a3d79

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

js/jquery.mobile.support.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,8 @@ $.extend( $.support, {
193193
// https://developers.google.com/chrome/mobile/docs/user-agent#chrome_for_ios_user-agent
194194
pushState: "pushState" in history &&
195195
"replaceState" in history &&
196+
// When running inside a FF iframe, calling replaceState causes an error
197+
!( window.navigator.userAgent.indexOf( "Firefox" ) >= 0 && window.top !== window ) &&
196198
( window.navigator.userAgent.search(/CriOS/) === -1 ),
197199

198200
mediaquery: $.mobile.media( "only all" ),

0 commit comments

Comments
 (0)