-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cannot scroll on swap with server-sent events #784
Comments
I think I can probably hack around this for now using the (undocumented) Edit: My workaround is: <div @htmx:sse-message.camel="$el.scrollIntoView(false)"> |
Yes. Agreed. Without duplicating a whole lot of code, this would require that html publish a workable |
Another workaround that does not require AlpineJS is this:
|
hate to plus one.... but plus one |
Was pulling my hair out trying to get this working before I realized that it's a known issue.
This also affects the WebSocket extension (basically anything that depends on And it also affects use of the idiomorph extension with WebSockets: |
From what I can tell, it's not possible to add any scrolling on swap with server-sent events. I'd like to be able to say
hx-swap="beforeend scroll:bottom"
and have it just work, but looking at the source code:I notice that while the
swapSpec
is parsed correctly, we only ever useswapSpec.swapStyle
- completely ignoringswapSpec.scroll
.The text was updated successfully, but these errors were encountered: