Hi,
I use Vue3 (with Bolt UXP framework) in my current project.
It’s supposed to be a chat app and I need to scroll the content down to the bottom.
But as soon as I use scrollTo or scrollTop Photoshop crashes.
Fun fact: the UXP Developer Tool debug window also closes in that moment so that you can’t see what the last log was. That’s fun!
Someone has experienced the same?
Thanks!
1 Like
This appears to be a problem when using Vue with UXP. You should avoid using ref on elements, as it leads to crashes. Use classic methods like querySelector and others to find elements.
As an option:
const scrollToItem = (id) => {
const element = document.getElementById(id);
if (element) {
element.scrollIntoView({ behavior: 'smooth', block: 'center' });
}
}
Thank you! Yes, that solved it! Thanks!!!
Using toRaw could also be a possible solution (totally forgot about it): Vue3 and ref on HTML crashes Photoshop - #2 by blackRGB