I changed the following pointerX and pointerY function to give me an usable position.
I am not sure how to create a test for this case if somebody can give pointers to do so i will try that
function pointerX(event) {
var docElement = document.documentElement,
body = document.body || { scrollLeft: 0 };
if (event.changedTouches) return (event.changedTouches[0].clientX +
(docElement.scrollLeft || body.scrollLeft) -
(docElement.clientLeft || 0));
return event.pageX || (event.clientX +
(docElement.scrollLeft || body.scrollLeft) -
(docElement.clientLeft || 0));
}
function pointerY(event) {
var docElement = document.documentElement,
body = document.body || { scrollTop: 0 };
if (event.changedTouches) return (event.changedTouches[0].clientY +
(docElement.scrollLeft || body.scrollLeft) -
(docElement.clientLeft || 0));
return event.pageY || (event.clientY +
(docElement.scrollTop || body.scrollTop) -
(docElement.clientTop || 0));
}
previous lighthouse ticket #1253 by qrizly
I changed the following pointerX and pointerY function to give me an usable position. I am not sure how to create a test for this case if somebody can give pointers to do so i will try that