Can anyone help me get a multiline text field to scroll to the bottom?
I’m calling chatGPT and getting back my conversation. I’d like the long conversation to auto-scroll to the bottom. I added and HTML ID for that field, and I’m doing javascript to ‘getElementById’ and that’s working because I can write element.textContent to the console, but when I try to write element.scrollHeight to the console I get ‘undefined’.
I’m confused a bit by the different things I find about scrolling, much of it seems to be about scrolling the page to a certain element, but I want to force my single field to scroll to the bottom of its scrollbar range. Any help is appreciated.
well - now I got scrollHeight, I’m still new to camelCase and always want to CapitalizeTheFirstLetterToo - ugh!
So now i want to element.scrollTop = element.scrollHeight but that seems to do nothing.