aino/galleria — Issue #226: Utils.addTimer callback doesn't work on iOS
Author: Ahrengot
Created: 2011-12-01 13:13:13+00:00
State: open

Using galleria-1.2.5 I have a bug when exiting fullscreen on iOS.

The following code lives on lines 1568-1579 of the main galleria file:

self.rescale(function() {
Utils.addTimer('fullscreen_exit', function() {
// show the image after 50 ms
Utils.show( self.getActiveImage() );
if ( typeof callback === 'function' ) {
callback.call( self );
}
}, 50);
self.trigger( Galleria.FULLSCREEN_EXIT );
});

Anything placed inside the callback function on Utils.addTimer won't make it's way to Mobile Safari. Simply moving `self.trigger( Galleria.FULLSCREEN_EXIT );` outside that callback won't work as it throws other bugs instead.