Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restoring Scrollposition after editing JS/CSS #56

Open
timteske opened this issue Feb 20, 2024 · 1 comment
Open

Restoring Scrollposition after editing JS/CSS #56

timteske opened this issue Feb 20, 2024 · 1 comment

Comments

@timteske
Copy link

Hi,
i have an issue with the scroll position.
After editing my JS or CSS Code it reloads the page without scrolling to the restored scroll position.
I only changed the listen_paths of the gem because im using postcss to:
config.hotwire_livereload.disable_default_listeners = true
config.hotwire_livereload.listen_paths = [Rails.root.join("app/assets/builds")]
My console output:
scroll_position

@kirillplatonov
Copy link
Owner

Could you please try disabling data-turbo-track for CSS like @mikker mentioned in #59?

+ <%= stylesheet_link_tag "application", "data-turbo-track": Rails.env.production? ? "reload" : "" %>
- <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants