I’m creating a chat and need to tell a textbox to scroll to the bottom as I programmatically add text in it. The idea is the something like:
$w(“#myTextbox”).text += “\n” + someText; $w(“#myTextbox”).scrollTo(0, 10000);
Obviously, scrollTo() doesn’t work for textboxes. How do I do it?
Hello. Can you do this in an HTML embed? That way you can use a element which you can use scrollTop or scrollTo on.
https://support.wix.com/en/article/velo-working-with-the-html-iframe-element
Thank you so much! It worked, although text areas have great limitations: no HTML markup, they’re measured in rows and columns instead of pixels and the result on mobile devices isn’t the greatest. But thanks anyway, at least it scrolls!
Agreed on the limitations so it greatly depends on your use case. Glad it worked and hopefully you have been able to iterate from there as needed!