Replies: 7 comments 9 replies
-
I feel like this may be related to the introduction of the Can you try setting the global These were introduced to prevent htmx from scrolling away when you are filling out a form that works in a similar way as yours, and you've already scrolled to a different position before the previous response is swapped. Like scrolling down to submit a long form using a button and then suddenly have the page jump up before you are able to submit it. If your inputs don't have IDs, then it's also possible it's just a matter of adding the ID attributes without necessarily including it in your |
Beta Was this translation helpful? Give feedback.
-
I tried that by tying ‘ htxm.config.defaultFocusScroll = true’ but the behaviour is the same
… On 18 Aug 2022, at 12:20, Alejandro Schmeichler ***@***.***> wrote:
I feel like this may be related to the introduction of the focus-scroll swap modifier and htxm.config.defaultFocusScroll global config. More info here https://htmx.org/attributes/hx-swap/#focus-scroll
Can you try setting the global htxm.config.defaultFocusScroll to true?
These were introduced to prevent htmx from scrolling away when you are filling out a form that works in a similar way as yours, and you've already scrolled to a different position before the previous response is swapped. Like scrolling down to submit a long form using a button and then suddenly have the page jump up before you are able to submit it.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
I tried that as well, but same behaviour
… On 18 Aug 2022, at 12:39, Alejandro Schmeichler ***@***.***> wrote:
Do the textareas have id attributes?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Can you create an example that reproduces the error using https://htmx.org/docs/#creating-demos and try rolling back htmx through different versions until you figure out on which version the issue started happening? |
Beta Was this translation helpful? Give feedback.
-
Will do
… On 18 Aug 2022, at 12:51, Alejandro Schmeichler ***@***.***> wrote:
Can you create an example that reproduces the error using https://htmx.org/docs/#creating-demos and try rolling back htmx through different versions until you figure out on which version the issue started happening?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.
|
Beta Was this translation helpful? Give feedback.
-
Full disclosure - I've started a higher level meta-thread on #1017 |
Beta Was this translation helpful? Give feedback.
-
Is it even possible to keep scroll for refreshed sections? like tables for instance |
Beta Was this translation helpful? Give feedback.
-
(I'm sure it never used to, so I'm questioning my sanity ;-)).
I have a page with a bunch of elements including textareas. The textareas POST when they lose focus and the reponse is a full page which re-renders outerHTML of the root element, e.g. a full page "refresh".
However, after the page refresh the position of the page is at the top, even if before that refresh the page had been scrolled down.
Is this expected default behaviour, and how do I stop it? I haven't overridden any globals and I'm not setting a scroll target in
hx-swap
. I don't want to jump to a known ID either, I simply want to scroll position remembered before the refresh and reapplied after the refresh. I could write some JS myself listening to the relevant events, but I'm absolutely convinced it didn't do this before.Help :-)
Beta Was this translation helpful? Give feedback.
All reactions