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

sse extension, swap delay not working #127

Open
RobMaskell opened this issue Dec 28, 2024 · 1 comment
Open

sse extension, swap delay not working #127

RobMaskell opened this issue Dec 28, 2024 · 1 comment

Comments

@RobMaskell
Copy link

I have SSE extension setup and working as per the following HTML

<div hx-ext="sse" sse-connect="/updates" sse-swap="type" hx-swap="afterbegin swap:10s">

The afterbegin is working, and I get a different effect if I change it to one of the other values, but the fragments swap in immediately whatever I set swap: too.

I had a quick look at the extension code, and it seems to generate a swap spec and pass it to the api swap function so I couldn't see an obvious problem, it looked like it ought to work

Also in Safari this is how that part of the docs render, the scroll bar is covering the bottom portion of the code making it tricky to read
image

@RobMaskell
Copy link
Author

Looking at it a bit more, in the html code proper, the new swap function doesn't seem to refer to swapDelay only settleDelay and the only place that does is a function called handleAjaxResponse which seems to have it's own swap logic and not use the new function.

I don't know this codebase though so this all could be by design, but it does seem to explain why swap:10s is not working for me

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

1 participant