kswedberg/jquery-smooth-scroll — Issue #19: Click scrolls to top of page when address bar is visible on Android
Author: jasonlcrane
Created: 2011-12-29 22:03:01+00:00
State: open

This is an edge case, but on Android, when a link at the top of a page should trigger a smooth scroll, it is causing the address bar to be hidden (effectively scrolling to the top of the page), rather than scrolling to the desired element. I created a couple test cases for reference.

The first simply demonstrates the problem (Android only): http://jsbin.com/utukef
The second hides the address bar using Scott Jehl's script from his recent 24ways.org article: http://jsbin.com/ewegag
Scott's original post: http://24ways.org/2011/raising-the-bar-on-mobile

The problem occurs if the address bar is visible at all when you're at the top of the document. I saw the problem on Android 2.1 and Android 4.0 phones.

I'm just using Scott's script during testing on my project for now, but I may tackle implementing this into the plugin itself. In any case, I thought it was worth pointing out in case others encounter the same problem.