From 3fb94baacadb66b1b497027b900e52647ed99f14 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 3 May 2016 13:01:55 -0400 Subject: [PATCH] revert to clientX/Y --- contrib/js/reply.js | 8 ++++---- contrib/static/nntpchan.js | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/contrib/js/reply.js b/contrib/js/reply.js index 2870741..1416991 100644 --- a/contrib/js/reply.js +++ b/contrib/js/reply.js @@ -363,16 +363,16 @@ function init(prefix) { e.addEventListener("dragstart", function(ev) { console.log(ev); - mouseDownX = ev.screenX; - mouseDownY = ev.screenY; + mouseDownX = ev.clientX; + mouseDownY = ev.clientY; if(!ev.shiftKey) { ev.preventDefault(); } }, false); e.addEventListener("dragend", function(ev) { - var x = originalX + ev.screenX - mouseDownX; - var y = originalY + ev.screenY - mouseDownY; + var x = originalX + ev.clientX - mouseDownX; + var y = originalY + ev.clientY - mouseDownY; x -= window.screenLeft; y -= window.screenTop; rpl.moveTo(x, y); diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index 53056a2..75d06cf 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -81,7 +81,7 @@ parent.appendChild(wrapper);parent.backlink=false;},function(msg){var wrapper=do parent.backlink=true;}};parent.backlink=true;} function inject_hover_for_element(elem){var elems=elem.getElementsByClassName("backlink");var ls=[];var l=elems.length;for(var idx=0;idx