3.0b bug: onChange the gallery element is not returned

4 messages Options
Embed this post
Permalink
FR6

3.0b bug: onChange the gallery element is not returned

Reply Threaded More More options
Print post
Permalink
version: 3.0b

When using the option "onChange" the argument is suppose to be the gallery element that is about to be displayed but its always "undefined".

"onOpen" works well.
Shadowbox.init({
	onOpen: function(o){ ... },
	onChange: function(o){
		//o = undefined
	}
});
My fix:
I replaced the line 462:
S.options.onChange(); 
with
S.options.onChange(S.getCurrent());
D

Re: 3.0b bug: onChange the gallery element is not returned

Reply Threaded More More options
Print post
Permalink
I'm experiencing this same issue.  How has there been nobody else complaining about this?  Shadowbox is broken.
Bjørn

Re: 3.0b bug: onChange the gallery element is not returned

Reply Threaded More More options
Print post
Permalink
In reply to this post by FR6
Thank you for this fix. Saved me hours debugging shadowbox. Hopefully this is fixed in the next release.
Ambient.Impact

Re: 3.0b bug: onChange the gallery element is not returned

Reply Threaded More More options
Print post
Permalink
In reply to this post by FR6
I've reported the same issue earlier, along with another bug. If you comment there to bump it up, it might get fixed faster.