Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Working badly hacked version of scrollTo for android

  • Loading branch information...
commit 63fdf51976186176835c808bfc6bbe8b2e77c7f0 1 parent fe50682
Yuvi Panda authored

Showing 1 changed file with 7 additions and 6 deletions. Show diff stats Hide diff stats

  1. +7 6 assets/www/android/platform.js
13 assets/www/android/platform.js
@@ -59,12 +59,13 @@ function setPageActionsState(state) {
59 59 })();
60 60
61 61 chrome.scrollTo = function(selector, posY) {
62   - console.log("MODIFIED!");
63   - var $el = $(selector);
64   - $el.hide().scrollTop(posY);
65   - window.setTimeout(function() {
66   - $el.show();
67   - }, 0);
  62 + // scrollTop seems completely useless on Android 2.x, unable to test so far on 4.x
  63 + // This is the exact opposite of what we noticed on 2.x in the previous release
  64 + // I've no idea why this is happening, neither does jon
  65 + // This gives us what we want for now, but now for non-zero scroll positions the
  66 + // behavior of scrollTo might be different across platforms.
  67 + // Ugh. Will bite us when we try to do hashlinks.
  68 + window.scrollTo(0, posY);
68 69 }
69 70
70 71 chrome.addPlatformInitializer(function() {

0 comments on commit 63fdf51

Please sign in to comment.
Something went wrong with that request. Please try again.