Skip to content

Reduce content shift on navigation - #6267

Merged
fregante merged 1 commit into
mainfrom
jumo
Feb 1, 2023
Merged

fregante merged 1 commit into
mainfrom
jumo

Conversation

@fregante

Copy link
Copy Markdown
Member

Probably:

Demo

Screen.Recording.2.mov

};

document.addEventListener('turbo:visit', () => {
document.addEventListener('turbo:render', () => {

@fregante fregante Jan 31, 2023 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the same event used to run features and it's currently attached/run before our "on load" listeners. I think this is helping avoid any flashes due to momentarily-missing classes. For example if a feature removes a class "on unload", the the "on load" listener will restore it immediately after, without a render/display of the page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

clean-dashboard lost after going back FOUC after Ajax navigation

1 participant