Is there any way to close a lightbox from a page code?
For example:
// Open a lightbox
..
// Execute some functions
// Then close the lightbox
Some function that return a promise might take a while to return their promise, in the meanwhile, I want to show a lightbox to prevent users from changing anything on the page that might affect the final result of the promise chain.
wixWindow.lightbox.close() // only works from inside the lightbox
Is there a solution or a way around? Using a regular box doesn’t look great since there’s a lot of content that are changing dynamically, so I can’t really set a fixed height for the box, sometimes the box will look too small, and sometimes will look too large.
Help is appreciated.