Bug in New Safari V 6.0.2 (8536.26.17) + V 6.0.3 (8536.28.10)
Only occurs in the New Safari V 6.0.2 (8536.26.17) on Mac. Previous Safari version was OK.
When having an element in my page that was position: fixed, it creates more space above the image in photoswipe.
How to fix?

I am having the same issue with a fixed scrollTop button which because the button is located in the lower section of the page sometimes the entire gallery image is hidden. When I resize the browser window the gallery image appears in the correct position. Any assistance is much appreciated. Thanks
I Have the same problem has anyone solved this issue? Thanks in advance!!!
Same problem here. Any update on this?
The issue remains in Version 6.0.3 (8536.28.10)
Well, I had a partially workaround: when clicking an image which you want to open Photoswipe for, you should let your browser scroll to the top.
What do you mean by "let your browser"? Should I make the browser to scroll to top from script or what? Btw as you can see on your screenshot the browser already scrolled to top, didn't it? Sad thing for me, I don't have a Mac right now, only my friend told me that my protfolio website have this isssue..
You need to scroll the page to the top: $('html, body').stop().animate({'scrollTop': 0}, 0); That should do the trick.
// init photoswipe
var instance = $('#photoswipeElement').photoSwipe();
// on before show
$(instance).on(window.Code.PhotoSwipe.EventTypes.onBeforeShow, function(e)
{
// scroll with 550 as speed
scrollFix(550);
});
// Scroll fix, because photoswipe does some strange things in safari V 6.0.2
function scrollFix(speed)
{
// get scroll element
var scrollElement = 'html, body';
// jump to top
$(scrollElement).stop().animate({'scrollTop': 0}, speed);
};
That should do the trick.
Awesome! :+1: I'm going to try this on my site and will get back to here, to tell you if it works! Thanks man!
Hmm.. Good news! Your solution seems to be working! Scrolling to the top in the onBeforeShow function fixes the issue. Thanks a lot man! You should do a pull-request or something!
I'm glad it helped you. It is not an all-covering solution, I also had a function for the "on hide" part. Where I wanted to scroll back to the original position I was on.
// on hide
$(instance).on(window.Code.PhotoSwipe.EventTypes.onHide, function(e)
{
scrollFix(10);
});
Grtz Jeroen Desloovere
Yeah, that's also a good idea to scroll back to the position where the page was. I imagine an option parameter for PhotoSwipe like "safariFix: true | false". If true, other two option parameters for scrolling speed are avalaible ("beforeShowScrollSpeed, hideScrollSpeed") and it would use your functions presented above. Good job!
Thanks siesqo!
@RynoRn : When will we set safariFix to true or false, for all safari versions?
That is hard to define. It would need more testing to do but for me it was the exact same version you mentioned in the issue's title. It should be set for (major) version 6 maybe, but I'm not sure. As I tested your fix doesn't ruin anything for other browsers neither it should for other versions of Safari.