diff options
author | Andrew Sapperstein <asapperstein@google.com> | 2014-04-07 16:44:11 -0700 |
---|---|---|
committer | Andrew Sapperstein <asapperstein@google.com> | 2014-04-15 17:12:55 +0000 |
commit | 575e82b628dca4a67dd25b883c504ce9109a345a (patch) | |
tree | 48f5aa71c1802c2c5689d548e4af4d99db12fd46 /assets | |
parent | 856e1313e7ee92319f78ad4fdca18584235c612b (diff) | |
download | android_packages_apps_UnifiedEmail-575e82b628dca4a67dd25b883c504ce9109a345a.tar.gz android_packages_apps_UnifiedEmail-575e82b628dca4a67dd25b883c504ce9109a345a.tar.bz2 android_packages_apps_UnifiedEmail-575e82b628dca4a67dd25b883c504ce9109a345a.zip |
Properly restore scroll position on K+ b/13333564.
There's a bug in chromium webview that causes the scroll
position to be improperly reported the first time
onScrollChanged is called. This breaks rotation
on K+ so we delay it until the content is ready on K.
Change-Id: I57729ad5279a999ab523919c6059897813b1370e
Diffstat (limited to 'assets')
-rw-r--r-- | assets/script.js | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/assets/script.js b/assets/script.js index e957d2d82..cd3045e03 100644 --- a/assets/script.js +++ b/assets/script.js @@ -576,6 +576,10 @@ function restoreScrollPosition() { } function onContentReady(event) { + // hack for b/1333356 + if (RUNNING_KITKAT_OR_LATER) { + restoreScrollPosition(); + } window.mail.onContentReady(); } @@ -779,6 +783,9 @@ collapseAllQuotedText(); hideAllUnsafeImages(); normalizeAllMessageWidths(); //setWideViewport(); -restoreScrollPosition(); +// hack for b/1333356 +if (!RUNNING_KITKAT_OR_LATER) { + restoreScrollPosition(); +} measurePositions(); |