Fix pjax on iOS Simulator
The iOS 8.0 simulator on Mavericks contains the following in its user-agent string: "iPhone; CPU iPhone OS 10_9_5 like Mac OS X" The "OS 1" bit gets interpreted by our regex as if it were iOS 1.0 and thus forcing pjax to be disabled since history manipulation APIs weren't stable until iOS 5.0. Close #19 Credits: https://github.com/defunkt/jquery-pjax/commit/863b802a84af8a9c72def4984d 4d38163541fe6d
This commit is contained in:
@@ -92,7 +92,7 @@
|
|||||||
window.history.pushState &&
|
window.history.pushState &&
|
||||||
window.history.replaceState &&
|
window.history.replaceState &&
|
||||||
// pushState isn’t reliable on iOS until 5.
|
// pushState isn’t reliable on iOS until 5.
|
||||||
!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]|WebApps\/.+CFNetwork)/)
|
!navigator.userAgent.match(/((iPod|iPhone|iPad).+\bOS\s+[1-4]\D|WebApps\/.+CFNetwork)/)
|
||||||
}
|
}
|
||||||
|
|
||||||
Pjax.forEachEls = function(els, fn, context) {
|
Pjax.forEachEls = function(els, fn, context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user