Code not executed on direct link and page refresh

Hi,

I use the following little code for some pages of my site…

import wixWindow from ‘wix-window’;
$w.onReady(function () {
wixWindow.scrollTo(0, 152);
});

If I open the page over a link within the site, the code will be executed. But if I refresh the page or go to it through a direct link, the code will not be executed. How can I achieve execution in all the above cases?

Thanks!
Michael

Hi Michael,
In order for us to successfully review this matter further and properly assist you, please send us a video of the issue using screencast . Simply recreate the issue while recording the steps. Add the screencast.com URL to your response.

Thanks,
Tal.

Hi,

thanks for the reply. Here is the sceencast …

https://www.screencast.com/t/mrRFl85ap

There you can see that the scrolling after the site is loaded is not working in this three cases:

  1. I load the next product with the navigation
  2. I reload the product page
  3. I open the product page via direct url

With console.log I noticed that the code is not executed at all.

Thanks,
Michael

Hi Michael,
Thanks for the screencast. Currently there’s no integration of Wix Code with Wix Stores , however this is on our backlog. The page you added the code to is the product page which is part of the Wix Stores product. I recommend following the Product Updates forum category to stay tuned.

Have a good day,
Tal.

Ok, so I can be lucky that it is working in the usual scenario at least. I will stay tuned.

Thank you