Fixed Lightbox defaults not used because of type


Well-known member
Affected version
Been trying to figure out why XF's lightbox doesn't display thumbnails by default even though the default in XF.Lightbox is options.lbThumbsAuto = 1, nor could I get it to work as expected when you override the defaults.

Long story short is Fancybox doesn't coerce that option.

From jquery.fancybox.js:
if (Thumbs.isActive && Thumbs.opts.autoStart === true) {;

Might be worth it to cast the setting before it gets passed along to Fancybox.
thumbs: {
   autoStart: !!this.options.lbThumbsAuto,
   axis: 'x'

TL;DR - Overriding the default "1" to "true" makes it work as expected.
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.8).

Change log:
coerce the lbThumbsAuto option value to a boolean to ensure it works as expected.
There may be a delay before changes are rolled out to the XenForo Community.
Top Bottom