Turbo: Re-enable Turbo cache once we can reliably detach before <body> is cached

Created on 30 December 2023, 6 months ago
Updated 20 January 2024, 5 months ago

Problem/Motivation

With Turbo caching enabled, using the back button usually causes things like contextual link triggers to be restored in the exact state they were (e.g. visible due to hover) and are not interactable, likely because the behaviours were still attached at the time the <body> was cached.

Steps to reproduce

See above.

Proposed resolution

For the time being, we're opting out of caching by adding <meta name="turbo-cache-control" content="no-cache"> to prevent Turbo caching.

We should re-enable caching but figure out why contextual links are broken when the page is restored from cache.

Remaining tasks

TBD. Probably implement a proper contextual detach or find a Drupal core issue β†’ doing that.

We can also look into Preparing the Page to be Cached but that may not help if it's a deeper issue with contextual links.

User interface changes

Contextual links no longer broken.

API changes

None?

Data model changes

None.

πŸ“Œ Task
Status

Active

Version

2.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada Ambient.Impact Toronto

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024