Skip to content

Property history.state is not supported #95

@sonic16x

Description

@sonic16x

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions