I am also facing this and have not found a good answer. I am growing frustrated.
I am using the lightbox as a drawer (side menu)
I want it to only appear on one specific page
I want it to be closed by default, and only open when the user takes a specific action on the page
Any mechanism I’ve tried to open it causes a multi second delay (even if there is nearly NOTHING inside the lightbox that would take time to render, and no code executing in onReady)
Previously, it was suggested to simply set the delay in the lightbox settings to 0. THIS DOES NOT WORK.
-
You can only set this property if the lightbox is set to “Automatically display lightbox on pages”. If you want the lightbox closed when the page loads, and only open when a user takes an explicit action, you cannot use this.
-
Even if you do set this property to 0, THERE IS STILL AN UNACCEPTABLE DELAY of several seconds. Again, this is in a lightbox that has nothing in it and no code in onReady. It shouldn’t be taking several seconds to execute NO CODE, and then render a DOM with just a couple of elements in it.
People have made suggestions like rolling your own by using a container box. I tried adding a box that is the entire height of the page + footer, then pinning it so it doesn’t scroll. Then I added buttons to open and close it and set the animation to glide in. This works okay on desktop, but…horrible on mobile. Using this solution will require a lot of noodling to make it functional on mobile, or probably a separate UI altogether.
Also, I’m not sure what’s up with the animations. The drawer glides in only once. The next time I cycle through hide/show it doesn’t animate.
There is ONE benefit of using this approach over a lightbox. And that is the way it communicates with the rest of the page. Lightboxes cannot talk to the page until they’re closed, at which time you pass a context object back and forth between the page and the lightbox. So it is impossible to update state on the page depending on user interactions inside the lightbox. You can do this with a container, because it is actually IN the page, and not in its own context.
Given the choice between rolling my own component, where I have to get everything correct for every possible form factor, and using a lightbox (and accepting that I can’t pass information back and forth while the lightbox is open), I’ll take the latter. But if opening a lightbox takes 2 seconds, they are basically UNUSABLE.
WIX…Can you give us a REAL solution to this?