You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Weirdly, the scrolling function works fine for the first instance, but not when I change the tab and try scrolling on the second. Any idea why this is happening?
The text was updated successfully, but these errors were encountered:
It's difficult to troubleshoot without knowing more about your codebase, but my suspicion is that both of your containers use #document_${this._uid} #page-container as the selector, and your non-visible tab probably still exists in the DOM & is being picked up by querySelector.
yeah, both use #document_${this._uid} #page-container as the selector, but the uid is different for each. If I open the console and I manually enter document.querySelector("#document_123 #page-container") and document.querySelector("#document_122 #page-container") the correct containers are selected, and I can see it in the console. But this does not happen in the scrollTo
So,
I have a component in which I use the scrollTo function. This component has a main div with a dynamic id, and inside it has a div with a fixed id
This component gets instanced twice, as it is behind a b-tabs (its in two tabs). Im calling the $scrollTo function with the following options:
Weirdly, the scrolling function works fine for the first instance, but not when I change the tab and try scrolling on the second. Any idea why this is happening?
The text was updated successfully, but these errors were encountered: