Now I watching into it, and as I see you change to scroll to Container, and it works as expected.
I am pretty sure you tried to scroll to a component that doesn’t render yet(not on the scene now). We can’t do that. Please, make sure your component is shown, and only in this case scroll to him.
I think I have narrowed down the cause for this, and it kind of makes sense to me now.
I have replicated a lot of the code on new page, and struggled to get same results.
The moment I turn on dynamic List for container, and try to scroll to text block inside container I get the error. It makes sense to me because you might have the same text block once or many times, depending on how many items are added dynamically to container, so it doesn`t know to which itteration of same “ID text block” to scroll.
I do believe that to be the cause, please let me know if you agree, because then I have definitely at least learned something today.
If you want to look at it, it NJM container, page is test
For now, you could scroll to a container of a text field. But I’ve created a ticket(BKNDLSS-27032) about writing an article for scrolling to the dynamic components.
Let me know if you can’t wait for it, and I create a short cheat sheet for you.