Closed Bug 1589724 Opened 5 years ago Closed 5 years ago

Trivial back button hijacking using History API fools Firefox, but not Chrome.

Categories

(Core :: DOM: Navigation, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1515073

People

(Reporter: twisniewski, Unassigned)

References

Details

The following script fragment works in Firefox to lock the user into being unable to use the back button without long-tapping/right-clicking it to get past the abuse, which is unfortunately impossible right now in Firefox Preview, so users are stuck:

  history.pushState(null, null, document.URL)
  window.addEventListener("popstate", function() {
    history.pushState(null, null, document.URL)
    location.reload()
});

Chrome is not affected by this; it seems to ignore the initial pushState, and not add it as a separate history entry.

Thomas, would it be similar to this bug
Bug 1580072

Flags: needinfo?(twisniewski)

Some issue that might have been related.
https://github.com/webcompat/web-bugs/issues/23283

See Also: → 1580072
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → DUPLICATE
Flags: needinfo?(twisniewski)
You need to log in before you can comment on or make changes to this bug.