devote / HTML5-History-API

HTML5 History API expansion for browsers not supporting pushState, replaceState
http://spb-piksel.ru
MIT License
1.02k stars 182 forks source link

pushState not working on Chrome on IOS 6 (ipad) #29

Closed ThaNarie closed 10 years ago

ThaNarie commented 11 years ago

When i do a pushState on Chome on ISO6, nothing happens. The native pushState does work (when not loading this library).

I'm trying to debug it myself, but hopefully you can fix it.

I'm having it currently on: ipad 3 ios 6.0.1 ipad 3 ios 6.1.2 iphone 4 ios 6.1

devote commented 11 years ago

Hi,

I can check only to: iPad 4 ios 6.1.3 - Chrome 27.0.1453.10 iPhone 5 ios 6.1.4 - Chrome 27.0.1453.10 The test site http://history.spb-piksel.ru/ uses the this library and on my devices works well.

If you have the ability to debug, I will be very grateful to you.

Thank you!

michaelnie commented 11 years ago

I am experiencing the same issue, even on your test site. It works without the library.

iPhone 4S, iOS 6.1.3, Chrome 27.0.1453.10

devote commented 11 years ago

I apologize for not having replied to your post earlier. Very strange, but I carried out tests on the iPhone 4S and found no problems. I do not even know how I be

CreepGin commented 11 years ago

Just experienced the same issue here.

iPhone 5, iOS 6.1.4, Chrome 28.0.1500.16

Safari on iOS works fine.

devote commented 11 years ago

I see the problem.

The problem is that the Chrome developers have decided to override the additional extension. If execute the alert(history.pushState), see the following:

function (a, c, f) {
    c = "undefined" == typeof a ? "" : i(a);
    f = f || window.location.href;
    q.call(history, a, null, f);
    e({
        command: "window.history.pushState",
        stateObject: c,
        pageUrl: f.toString()
    });
}

here this time of code: q.call(history, a, null, f); breaks library operation because as the context transmitted to history. They had to write in this way: q.call(this, a, null, f);

I will try to solve something. Wait for updates.

devote commented 11 years ago

This fix does not ensure stable operation, errors may occur. I will be contacting the developers of Chrome that would solve the problem.

ThaNarie commented 10 years ago

Hi,

I'm wondering if you've heard anything from the Chrome developers :)

ThaNarie commented 10 years ago

For now I've only included the history file for IE so Chrome/FF/Safari will use the native version. Seems to be working OK :)

devote commented 10 years ago

I close this issue, if you still want to solve this, let me know. Thank you

oleg-andreyev commented 8 years ago

Ref. to source in CriOS (about override pushState/replaceState): https://chromium.googlesource.com/chromium/src/+/master/ios/web/web_state/js/resources/core.js#412 https://chromium.googlesource.com/chromium/src/+/master/ios/web/web_state/js/resources/core.js#427