I have a little issue with scrolling in KaiOS. I would like to have the first element selected when the user goes down on the last element.
So, I used document.getElementById(element).scrollIntoView();
to get the first element into the view. Works fine in the WebIDE, but not on the real phone.
I also tried scrollElement.scrollBy({ top: -(document.documentElement.scrollHeight), left: 0, behavior: "smooth" });
.
When I try it in the console it works fine, but when executes in the app, it doesn't. Maybe it has something to do with the .focus on the element, I have no idea. Is there a good example for this kind of scrolling? What am I doing wrong?