Forum Discussion

JoanneChen's avatar
JoanneChen
Super Hero
6 days ago

Show Scrolling panel at the end

Hi Heroes,

I used to use a code for showing the scrolling panel at the end when the timeline starts. It worked perfectly before. However, it doesn't work anymore, even when I republish the original file without changing anything. Does anyone have an idea?

let scrollbar = document.getElementsByClassName("scrollarea-area")
scrollbar[0].scrollTop = 9999999

  • Joanne, your code seems to work when I test it. I did essentially the same thing as an example for someone recently (attached). Are you getting an error in the console? Is the scroll panel not ready in the DOM when you are trying to find it? Maybe you could try adding a setTimeout() delay to see if it is a timing issue.

  • Hi Nathan, 

    Thanks for replying and testing my code. I did check the console and got no error message.
    What I did wrong was that I didn't test the code alone in a new slide. Instead, I just opened my previous project (the one that worked) and reviewed it, thinking the code didn't work anymore. So thank you for confirming the code works. I found the issue was caused by the text format. I accidentally set the text to a fixed size. When I set it to expand height, it fixed the issue.
    Additionally, in my previous project, I had a group in the scrolling panel, not text. The reason it didn't work was because the scroll panel wasn't ready in the DOM. When I added a timeout, it worked. I was very frustrated yesterday while troubleshooting this issue. Thankfully, I got it fixed. Hope sharing this experience could help someone avoid the same frustration I had.