summaryrefslogtreecommitdiffstats
path: root/assets
diff options
context:
space:
mode:
authorAndrew Sapperstein <asapperstein@google.com>2013-08-20 13:08:03 -0700
committerAndrew Sapperstein <asapperstein@google.com>2013-08-20 14:57:30 -0700
commitca080ad4929827ecd5e6167bc55f4dd92a7b8db1 (patch)
tree54b2d696334a7300772b95d30725578b02d93f42 /assets
parent73acde2955d5c3e03a94aaf5ae7a3b7959e746c6 (diff)
downloadandroid_packages_apps_UnifiedEmail-ca080ad4929827ecd5e6167bc55f4dd92a7b8db1.tar.gz
android_packages_apps_UnifiedEmail-ca080ad4929827ecd5e6167bc55f4dd92a7b8db1.tar.bz2
android_packages_apps_UnifiedEmail-ca080ad4929827ecd5e6167bc55f4dd92a7b8db1.zip
Fix b/10407366.
We were occasionally using the wrong height of the html document to determine where to place the bottom footer. We're now using the proper place for the bottom of the webview. However, there are still some minor issues (a little bit of content being cut off due to some other improper use of offsetHeight). The fix for that issue will be tracked in b/10410912. Change-Id: I2f6dbd46f52db3809e14ddb3e3257ebbc0fbe0b4
Diffstat (limited to 'assets')
-rw-r--r--assets/script.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/assets/script.js b/assets/script.js
index b30305a48..fbae0417c 100644
--- a/assets/script.js
+++ b/assets/script.js
@@ -592,8 +592,12 @@ function measurePositions() {
}
// add an extra one to mark the top/bottom of the last message footer spacer
overlayTops[i] = "" + prevBodyBottom;
- overlayBottoms[i] = "" + document.body.offsetHeight;
-
+ var body = document.body,
+ html = document.documentElement;
+ // get the true height of the value - the max of 4 possibilities
+ var height = Math.max(body.scrollHeight, body.offsetHeight,
+ html.scrollHeight, html.offsetHeight);
+ overlayBottoms[i] = "" + height;
window.mail.onWebContentGeometryChange(overlayTops, overlayBottoms);
}