Fixed widget height calculation
Change-Id: I418b0bf0ed29a123e030853f47ca8964e0960bff
diff --git a/dev/js/src/plugin/client.js b/dev/js/src/plugin/client.js
index 4e7e337..4e6ec3c 100644
--- a/dev/js/src/plugin/client.js
+++ b/dev/js/src/plugin/client.js
@@ -69,9 +69,16 @@
* embedding KorAP
*/
resize : function () {
+ var de = document.documentElement;
+ var height = de.scrollHeight;
+
+ // Add assumed scrollbar height
+ if (de.scrollWidth > de.clientWidth) {
+ height += 14;
+ };
this._sendMsg({
'action' : 'resize',
- 'height' : document.documentElement.scrollHeight
+ 'height' : height
});
}
};