Wix lightbox scroll up automatically

Hello guys I’m sorry that I’m not good at English, but I have several questions on wix lightbox.
here is my personal page that have lightbox problem.

At first becuase I’m not good at script so I turned on Automatically display lightbox on pages to yes, and at several times I don’t have problem. when I get each page (not refresh it,) the lightbox pop out every time when I click the page normally and when I shut down the lightbox, It didn’t go to the top of the page.

But after I finish almost all of my work, problem comes that when I reach that page after first time the lightbox didn’t work anymore after once, and when I scroll down my page before lightbox pop up and when I turn on lightbox, the page scroll up. Even scroll up automatically problem only happen in only several page. So I tried to use corvid so I put in my lightbox page with turn of Automatically display lightbox on page no,

import wixWindow from ‘wix-window’ ;

// …

wixWindow . openLightbox ( “community” );

And finish, It didn’t work. pop up doesn’t work. So now I changed these in to automatically pop up.


To open a lightbox automatically when your page loads, you need to place the lightbox code inside onReady page function. If you wish for the lightbox to open on every page, then your code should be on the site tab of the code panel.

Should you need further assistance, p lease reach out to Wix Customer Care . They can assist you to translate the issue and forward it to the Corvid Team.

Good luck!

Thanks for your reply. ㅜㅜ But I have one more problem that when I put

import wixWindow from ‘wix-window’ ;
// …
wixWindow . openLightbox ( “community” );

code inside onready code, the error comes like this ㅜㅜ can I know what’s the problem?

The issue you are experiencing is because you are putting the import statement inside a function instead of putting it outside function code. It’s recommended practice to put it on top of your code panel. See sampe code below:

import wixWindow from'wix-window';//Import is outside

$w.onReady(function () {


Good luck!

@samuele Thanks for your help! I finally solve it. Have a nice day!

1 Like