SOLVED - Lightbox Errors confirmed by Corvid, but no fix yet.

Hi all,

I have reproduced this and it is indeed a bug. I have notified our developers with a high priority, so hopefully this will be fixed quickly.

As @brainstorrrm noted, the bug occurs if the user closes the lightbox either by clicking on the “Close Lightbox Button” component that is provided by default with all the lightbox templates or by clicking outside the lightbox. Oddly, it does not seem to occur (at least for me) if the user clicks the ‘X’ in the upper-right corner of the lightbox.

The best workaround, as @brainstorrrm noted above: since the bug only occurs when you’re using code to call the lightbox, you can create your own button in the lightbox and add a click handler that closes the lightbox with code:

export function closeLightbox_onClick() {
    wixWindow.lightbox.close();
}

For more information, see Lightbox - Velo API Reference - Wix.com

Make sure you disable or remove the lightbox’s native Close button. Unfortunately, clicking outside the lightbox will still trigger the bug. You might be able to insert code in the calling page that will handle the Promise rejection, and if this error occurs you can proceed with the same logic as though the Promise had resolved normally.

In the meantime, I apologize for the inconvenience and I thank you for your patience.