Skip to content

Commit

Permalink
Merge pull request #146 from rackt/disable-crios
Browse files Browse the repository at this point in the history
Disable browser history on Chrome iOS
  • Loading branch information
timdorr committed Nov 19, 2015
2 parents 1dc1815 + c271861 commit 4612beb
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion modules/DOMUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,14 @@ export function getUserConfirmation(message, callback) {
*/
export function supportsHistory() {
let ua = navigator.userAgent
if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) {
if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) &&
ua.indexOf('Mobile Safari') !== -1 &&
ua.indexOf('Chrome') === -1 &&
ua.indexOf('Windows Phone') === -1) {
return false
}
// Chrome iOS has a buggy History implementation: https://github.com/rackt/react-router/issues/2565
if (ua.indexOf('CriOS') !== -1) {
return false
}
return window.history && 'pushState' in window.history
Expand Down

0 comments on commit 4612beb

Please sign in to comment.