Skip to content
Snippets Groups Projects
Commit a8029bee authored by ambient.impact's avatar ambient.impact
Browse files

Issue #3488464: Hide progress bar sooner to fix transition performance.

parent 5dec7f37
Branches
Tags 2.0.0-alpha4
No related merge requests found
Pipeline #360623 passed
...@@ -50,13 +50,19 @@ ...@@ -50,13 +50,19 @@
progressBarDelay.hideVisit(); progressBarDelay.hideVisit();
html.removeEventListener( html.removeEventListener(
'turbo:load', hideSuccess, {once: true}, 'refreshless:before-render', hideSuccess, {once: true},
) )
}; };
// We're using refreshless:before-render rather than turbo:load because the
// progress bar is noticeably less smoothly transitioned out when loading
// some complex/heavy pages on mobile in some browsers, specifically Firefox
// on Android. The refreshless:before-render is early enough that it should
// give the progress bar enough time to transition out before the new <body>
// contents are rendered.
html.addEventListener( html.addEventListener(
'turbo:load', hideSuccess, {once: true}, 'refreshless:before-render', hideSuccess, {once: true},
); );
html.addEventListener( html.addEventListener(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment