Problem/Motivation

I installed refreshless_preloader/turbo. On my site I am seeing css animations triggered twice. This wasn't the case before. The JS animations are fine!

Steps to reproduce

  1. Go to site frontpage
  2. Go to /articles
  3. Go back to frontpage
  4. Not in 100% cases, but maybe 85% the css animations are done twice

Debugging:

RefreshLess: prefetching /articles debug.js:43:13
RefreshLess: prefetch used for /articles debug.js:51:13
RefreshLess: navigated to /articles debug.js:89:13
RefreshLess: 💾 preparing page for cache debug.js:32:13
RefreshLess: detaching behaviours debug.js:25:13
RefreshLess: no new stylesheets added debug.js:109:15
RefreshLess: added 1 new script element to the head: 
Array [ script ]
debug.js:141:13
RefreshLess: detaching behaviours debug.js:25:13
RefreshLess: no new script elements added to the body debug.js:132:15
RefreshLess: no new script elements to load debug.js:157:15
RefreshLess: drupalSettings has been updated debug.js:97:13
RefreshLess: attaching behaviours debug.js:18:13
GET
https://site-hda-page.ddev.site/sites/default/files/styles/large/public/2026-03/Screenshot from 2026-03-11 18-47-06.png.avif?itok=raxvaQOh
[HTTP/2 404  36ms]

RefreshLess: prefetching / debug.js:43:13
RefreshLess: 💾 preparing page for cache debug.js:32:13
RefreshLess: detaching behaviours debug.js:25:13
RefreshLess: no new stylesheets added debug.js:109:15
RefreshLess: added 1 new script element to the head: 
Array [ script ]
debug.js:141:13
RefreshLess: detaching behaviours debug.js:25:13
RefreshLess: no new script elements added to the body debug.js:132:15
RefreshLess: no new script elements to load debug.js:157:15
RefreshLess: navigated to / debug.js:89:13
RefreshLess: no new stylesheets added debug.js:109:15
RefreshLess: added 1 new script element to the head: 
Array [ script ]
debug.js:141:13
RefreshLess: no new script elements added to the body debug.js:132:15
RefreshLess: no new script elements to load debug.js:157:15
RefreshLess: drupalSettings has been updated debug.js:97:13
GET
https://site-hda-page.ddev.site/sites/default/files/styles/large/public/2026-03/Screenshot from 2026-03-11 18-47-06.png.avif?itok=raxvaQOh
[HTTP/2 404  41ms]

GET
https://site-hda-page.ddev.site/sites/default/files/2026-02/merlin-at-b2b_color.jpg
[HTTP/2 404  18ms]

RefreshLess: attaching behaviours debug.js:18:13

OR

RefreshLess: navigated to / debug.js:89:13
RefreshLess: no new stylesheets added debug.js:109:15
RefreshLess: no new script elements added to the head debug.js:132:15
RefreshLess: no new script elements added to the body debug.js:132:15
RefreshLess: no new script elements to load debug.js:157:15
RefreshLess: drupalSettings has been updated debug.js:97:13
GET
https://site-hda-page.ddev.site/sites/default/files/styles/large/public/2026-03/Screenshot from 2026-03-11 18-47-06.png.avif?itok=raxvaQOh
[HTTP/2 404  48ms]

RefreshLess: attaching behaviours debug.js:18:13

Debugging where the css animations are ok ( I only have the last step saved, and now i can't reproduce this case anymore):

RefreshLess: navigated to / debug.js:89:13
RefreshLess: 💾 preparing page for cache debug.js:32:13
RefreshLess: detaching behaviours debug.js:25:13
RefreshLess: no new stylesheets added debug.js:109:15
RefreshLess: added 1 new script element to the head: 
Array [ script ]
debug.js:141:13
RefreshLess: detaching behaviours debug.js:25:13
RefreshLess: no new script elements added to the body debug.js:132:15
RefreshLess: no new script elements to load debug.js:157:15
RefreshLess: drupalSettings has been updated debug.js:97:13
RefreshLess: attaching behaviours debug.js:18:13

I dont get any log entries.

The animations look like this and are located in an SDC)

.hero--animated {
  .hero-label {
    animation: slideInDown 0.8s ease-out;
  }
  h1 {
    animation: slideInUp 0.8s ease-out 0.2s both;
  }
  .hero-description {
    animation: slideInUp 0.8s ease-out 0.4s both;
  }
  .hero-cta {
    animation: slideInUp 0.8s ease-out 0.6s both;
  }
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

anruether created an issue. See original summary.

anruether’s picture

Issue summary: View changes
anruether’s picture

Occasionally(!) I get the console error:

Error: Could not find a Drupal settings <script> element!
    update https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/js/drupal_settings.js?tbs2ow:153
    #renderTasks https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/js/refreshless.js?tbs2ow:730
    #renderHandler https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/js/refreshless.js?tbs2ow:676
    core https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/js/refreshless.js?tbs2ow:255
    jQuery 2
    dispatch https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:356
    notifyApplicationAfterRender https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:6024
    viewRenderedSnapshot https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:5960
    render https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:1580
    renderPage https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:5490
    renderPageSnapshot https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:4067
    promise callback*renderChange https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:3642
    renderPageSnapshot https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:4066
    loadResponse https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:3859
    render https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:4061
    loadResponse https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:3853
    visitRequestCompleted https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:4108
    recordResponse https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:3838
    requestSucceededWithResponse https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:3961
    receive https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:942
    perform https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:919
    issueRequest https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:3816
    visitStarted https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:4101
    start https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:3766
    startVisit https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:4603
    visitProposedToLocation https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:4092
    visitProposedToLocation https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:5870
    proposeVisit https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:4593
    visit https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:5709
    followedLinkToLocation https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:5859
    clickBubbled https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:1721
    clickCaptured https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:1710
    start https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:1696
    start https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:5663
    start https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:6135
    <anonymous> https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:7129
    <anonymous> https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:8
    <anonymous> https://site-hda-page.ddev.site/modules/contrib/refreshless/modules/refreshless_turbo/vendor/@hotwired/turbo/dist/turbo.es2017-umd.js?v=8.0.13-patch1:9
refreshless.js:734:17
anruether’s picture

Title: Css animaitons are triggered twice on returning to frontpage » Css animations are triggered twice on returning to frontpage
Issue summary: View changes
anruether’s picture

Issue summary: View changes
anruether’s picture

Also: Occasionally coffee via shortcut Alt-D stops working