Tim Nelke
horo.dev
Tim Nelke
@horo.dev
Web Developer 💻 | Passion for Anime, Gaming and Japanese culture | ISFJ-A / ISFJ-T

https://timnelke.com/
Definitly the Nier series.
December 8, 2024 at 12:02 AM
I tried to imperatively set the FormData on error by itterating over the form ref's `elements` property but this seemingly only flashes the contents and then removes it again. What is this?!
October 31, 2024 at 11:01 PM
Though I most admit at this point it is rather a solution to the specific problem you showed off instead of a general one of trying to differentiate the programmatic from the human scroll
October 30, 2024 at 10:34 PM
As far as I can tell it shouldn't matter if you got there programatically or not.

The only job of the observer would be to move the scroll position to the bottom.

So all the scroll event would need to do if to decide if the element should be observed or not.

Will try tomorrow and get back to you
October 30, 2024 at 10:32 PM
So this would mean, in a scroll event, you could simply `unobserve` your element if `e.target.scrollHeight - e.target.clientHeight < e.target.scrollTop` and observe it later again when `e.target.scrollHeight - e.target.clientHeight === e.target.scrollTop`.

Or am I missing something? 🤔
October 30, 2024 at 9:20 PM
As stated in the comments there are some downsides to this approach.

Shouldn't all of those get alleviated if you allow your component to have access to the `ResizeObserver`, either directly by passing the ref or having a subscription mechanism?
October 30, 2024 at 9:20 PM