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

Preserve scroll position when morphing turbo frames #1272

Open
danielfriis opened this issue Jun 4, 2024 · 0 comments
Open

Preserve scroll position when morphing turbo frames #1272

danielfriis opened this issue Jun 4, 2024 · 0 comments

Comments

@danielfriis
Copy link

I have a Turbo Frame that looks something like this:

<%= turbo_frame_tag :messages, src: messages_path, target: "_top", refresh: "morph" %>

I've added refresh: 'morph' to allow it to morph when things change in the frame.

However, the scroll position is reset every time this happens.

Let's say I delete a message, then the scroll position is reset, and I'm back at the top of the frame.

It seems that we are missing an attribute to preserve the scroll position.

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

No branches or pull requests

1 participant