From 7daa0f852025d1e577f558124a94758b08034925 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 3 May 2016 12:38:46 -0400 Subject: [PATCH] use screenX/y instead of 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 bf79915..fb5263c 100644 --- a/contrib/js/reply.js +++ b/contrib/js/reply.js @@ -363,13 +363,13 @@ function init(prefix) { e.addEventListener("dragstart", function(ev) { console.log(ev); - mouseDownX = ev.clientX; - mouseDownY = ev.clientY; + mouseDownX = ev.screenX; + mouseDownY = ev.screenY; }, false); e.addEventListener("dragend", function(ev) { - var x = originalX + ev.clientX - mouseDownX; - var y = originalY + ev.clientY - mouseDownY; + var x = originalX + ev.screenX - mouseDownX; + var y = originalY + ev.screenY - mouseDownY; x -= window.screenLeft; y -= window.screenTop; rpl.moveTo(x, y); diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index 45d7c21..c7258c2 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