Title says it all. We only do history.pushState(), which is not enough.

See https://developer.mozilla.org/en-US/docs/Web/API/History_API.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers created an issue. See original summary.

Wim Leers’s picture

Project: Turbolinks » RefreshLess
Wim Leers’s picture

Assigned: Unassigned » Wim Leers
Wim Leers’s picture

Status: Active » Needs review
FileSize
3.07 KB

Initial version.

anavarre’s picture

Patch applied successfully. Didn't notice any issue with the back button now.

Wim Leers’s picture

FileSize
10.84 KB
6.86 KB

The back button was indeed working, but drupalSettings was not yet being updated, and particularly not drupalSetting.path.currentPath.

This fixes that, and does a bunch of refactoring to:

  1. Prevent multiple code paths to create Ajax instances (like #4 has), which would be a maintenance nightmare in the long run
  2. Support state of any size, by using sessionStorage
  3. Support debug output also when navigating back and forward
Wim Leers’s picture

Title: Back/forward buttons are broken » Back/forward buttons are broken: implement onpushstate event handler

Better title

  • Wim Leers committed 55a3db4 on 8.x-1.x
    Issue #2692299 by Wim Leers: Back/forward buttons are broken: implement...
Wim Leers’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.