-
Bug
-
Resolution: Fixed
-
Normal
-
8.5.0
-
None
One of our automatic tests fails because of the truthy check in _docMouseDown. In our test we click at position 0, which will evaluate to false in these conditions. We recommend patching this code to avoid any corner case issues. Below is our fix:
function _docMouseDown(evt, wgt, noFocusChange) {
zk.clickPointer[0] = evt.pageX;
zk.clickPointer[1] = evt.pageY;
if (!wgt) wgt = evt.target;
var target = evt.domTarget,
dEvent = evt.domEvent,
body = document.body,
old = zk.currentFocus,
// B80-ZK-3346: offset is not used on Firefox before version 3.8
targetPos = jq(target).position(),
oriEvent = target.originalEvent,
dEventOfsX = dEvent.offsetX,
dEventOfsY = dEvent.offsetY,
evtX = /** ATOSS MODIFICATION BEGIN*/ typeof dEventOfsX !== 'undefined' /* ATOSS MODIFICATION END**/?
(zk.mobile ? dEventOfsX - targetPos.left : dEventOfsX) :
(oriEvent ? oriEvent.layerX - targetPos.left : undefined),
evtY = /** ATOSS MODIFICATION BEGIN*/ typeof dEventOfsY !== 'undefined' /* ATOSS MODIFICATION END**/?
(zk.mobile ? dEventOfsY - targetPos.top : dEventOfsY) :
(oriEvent ? oriEvent.layerY - targetPos.top : undefined);