-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Normal
-
Affects Version/s: 6.5.7, 8.0.2
-
Component/s: ZK Update Engine
-
Security Level: Jimmy
-
None
-
Environment:
Chrome 40 on Windows 7
Chrome 50 on Windows 10
-
ZK 8.0.3 S4
-
None
Run this code, then start zooming the view to 110%, 125%, etc. You should see "java.lang.Double cannot be bast to java.lang.Integer".
test.zul
<window title="test" border="normal" width="10000px" height="10000px" onClientInfo='' > </window>
My proposed patch:
diff.patch
diff --git a/zk/src/archive/web/js/zk/dom.js b/zk/src/archive/web/js/zk/dom.js
index 2ed8be6..27ee447 100644
--- a/zk/src/archive/web/js/zk/dom.js
+++ b/zk/src/archive/web/js/zk/dom.js
@@ -1829,31 +1829,31 @@ zk.copy(jq, {
* @return int
*/
innerX: function () {
- return window.pageXOffset
+ return Math.round(window.pageXOffset
|| document.documentElement.scrollLeft
- || document.body.scrollLeft || 0;
+ || document.body.scrollLeft || 0);
},
/** Returns the Y coordination of the visible part of the browser window.
* @return int
*/
innerY: function () {
- return window.pageYOffset
+ return Math.round(window.pageYOffset
|| document.documentElement.scrollTop
- || document.body.scrollTop || 0;
+ || document.body.scrollTop || 0);
},
/** Returns the height of the viewport (visible part) of the browser window.
* It is the same as jq(window).width().
* @return int
*/
innerWidth: function () {
- return jq(window).width();
+ return Math.round(jq(window).width());
},
/** Returns the width of the viewport (visible part) of the browser window.
* It is the same as jq(window).height().
* @return int
*/
innerHeight: function () {
- return jq(window).height();
+ return Math.round(jq(window).height());
},
/** A map of the margin style names: {l: 'margin-left', t: 'margin-top'...}.