Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property history.state is not supported #95

Open
sonic16x opened this issue Apr 8, 2016 · 0 comments
Open

Property history.state is not supported #95

sonic16x opened this issue Apr 8, 2016 · 0 comments

Comments

@sonic16x
Copy link

sonic16x commented Apr 8, 2016

Hi. In Android 4.0.3 on Android Browser is not support property history.state. Information from here
_008

Not everything that supports methods history.replaceState and history.pushState, has a property history.state support.

Can you fix it ? You can make it using this code.

if (typeof window.history.state == 'undefined') {
  var originReplace = history.replaceState;

  window.history.replaceState = function(state, title, path) {
    window.history.state = state;
    originReplace.call(window.history, state, title, path);
  };

  var originPush = window.history.pushState;

  window.history.pushState = function(state, title, path) {
    window.history.state = state;
    originPush.call(window.history, state, title, path);
  };
}

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant