Skip to content

Commit

Permalink
Mountain Lion fullscreen bug
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhellsing committed Aug 13, 2012
1 parent 644ada3 commit cc4e76f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/galleria.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Galleria v 1.2.8 2012-08-09
* Galleria v 1.2.8b 2012-08-13
* http://galleria.io
*
* Licensed under the MIT license
Expand Down Expand Up @@ -1574,7 +1574,12 @@ Galleria = function() {
if ( self._options.trueFullscreen && _nativeFullscreen.support ) {
_nativeFullscreen.enter( self, callback );
} else {
fullscreen._enter( callback );
// Safari Mountain Lion work around
fullscreen.scrolled = $win.scrollTop();
window.scrollTo(0, 1);
window.setTimeout(function() {
fullscreen._enter( callback );
}, 1);
}
},

Expand All @@ -1587,8 +1592,6 @@ Galleria = function() {

self.$( 'container' ).addClass( 'fullscreen' );

fullscreen.scrolled = $win.scrollTop();

// begin styleforce
Utils.forceStyles(self.get('container'), {
position: 'fixed',
Expand Down

0 comments on commit cc4e76f

Please sign in to comment.