From 2613c57bf8a353bb1bafe402b6eff8316dab6bb7 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 3 May 2016 14:25:32 -0400 Subject: [PATCH] try fix --- 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 ec66257..795c162 100644 --- a/contrib/js/reply.js +++ b/contrib/js/reply.js @@ -393,8 +393,8 @@ function init(prefix) { e.addEventListener("dragstart", function(ev) { console.log(ev); - mouseDownX = ev.clientX; - mouseDownY = ev.clientY; + mouseDownX = ev.screenX; + mouseDownY = ev.screenY; if(!ev.shiftKey) { ev.preventDefault(); } @@ -402,8 +402,8 @@ function init(prefix) { e.addEventListener("dragend", function(ev) { console.log(mouseDownX, mouseDownY); - var dx = ox + ev.clientX - mouseDownX; - var dy = oy + ev.clientY - mouseDownY; + var dx = ox + ev.screenX - mouseDownX; + var dy = oy + ev.screenY - mouseDownY; console.log(ox, oy, dx, dy); rpl.translate(dx, dy); diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index 37fc64c..105eb6e 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -84,7 +84,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