26

In Safari for OS X Lion, when you use the swipe gesture to navigate forward or backward in history, the window animates as though you were moving through physical pages. The problem with this behavior is that many apps already listen for changes in the history state, and respond appropriately -- either when the hash is changed, or when HTML5 pushState is used.

A perfect example is GitHub, when navigating in and out of folders -- https://github.com/johndyer/mediaelement, for example. If you click on a folder, then swipe to the previous page, the end state "snapshot" is shown, and then animated to again from the beginning state, which not only is confusing, but nullifies the informational value of the animation.

Today is my first day using Lion, but I'm curious if any other web devs have encountered this issue, and whether you've found a workaround?

Michael J. Barber
  • 24,518
  • 9
  • 68
  • 88
JKS
  • 3,710
  • 2
  • 29
  • 40
  • FWIW, a short, expressive title is better than a longer one ;) – Felix Kling Jul 20 '11 at 21:08
  • I know, I know... I was really struggling with this one. "Workaround for history animation in Safari for OS X Lion", maybe. – JKS Jul 20 '11 at 21:13
  • 1
    Yeah, we've got the same problem with a website we're developing. The new feature is 'cool', but breaks anyone who set up their website like you explained. We haven't figured a workaround yet (just annoyed us). – Christian Jul 22 '11 at 02:18
  • I'm looking for an answer for this as well. – arbales Jul 26 '11 at 18:41
  • I'd really like to know how to either fix this, or just be able to turn it off at least locally for my own machine... – Glenn Jorde Jul 28 '11 at 17:11

3 Answers3

1

Sadly it seems there's no documentation about this in the Safari Developer Library.

But there is an (ugly) workaround to disable them on your client machine at least. In the Trackpad settings, if you set Swipe between pages to Swipe with two or three fingers you can use two fingers to do fancy animations, and three fingers if you don't like them. But it feels really weird, especially because the three finger swipe is in the wrong direction.

toabi
  • 3,986
  • 1
  • 24
  • 24
0

Maybe use Modernizr to sniff out Safari and rely on Safari's native animation instead of your code's animation? I know this doesn't help with consistency, but lets face it... this is a browser we are talking about!

srquinn
  • 10,134
  • 2
  • 48
  • 54
-1

I would suggest that you go into settings and navigate to gestures. Here, you will see a little dropdown bar that contains the options. Select either of the other two options to fix this. Hope I could help!