From 7bdb104fcfa82af9a7ce02b6d9e096a33fa00ec7 Mon Sep 17 00:00:00 2001 From: Jeff Date: Tue, 3 May 2016 14:16:15 -0400 Subject: [PATCH] try fix --- contrib/js/reply.js | 13 +++++++++++-- contrib/static/nntpchan.js | 8 +++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/contrib/js/reply.js b/contrib/js/reply.js index 0e46e7b..6e7ce3b 100644 --- a/contrib/js/reply.js +++ b/contrib/js/reply.js @@ -40,6 +40,7 @@ function DynReply(existingElem) { this.form = this.elem.querySelector("form"); this._error = document.getElementById("postform_msg"); this.url = this.form.action + "?t=json"; + this.moveTo(0,0); return; } @@ -136,8 +137,16 @@ function DynReply(existingElem) { this.roothash = null; this.prefix = null; this.url = null; + this.moveTo(0,0); } +DynReply.prototype.getX = function () { + return this.x; +} + +DynReply.prototype.getY = function () { + return this.y; +} DynReply.prototype.translate = function(dx, dy) { if (this.x && this.y) { @@ -398,8 +407,8 @@ function init(prefix) { console.log(ox, oy, dx, dy); rpl.translate(dx, dy); console.log(rpl.x, rpl.y); - ox = rpl.x; - oy = rpl.y; + ox = rpl.getX(); + oy = rpl.getY(); }, false); // add replyto post handlers diff --git a/contrib/static/nntpchan.js b/contrib/static/nntpchan.js index 8a30d69..6abefc6 100644 --- a/contrib/static/nntpchan.js +++ b/contrib/static/nntpchan.js @@ -49,10 +49,12 @@ var dynreply;function getReplyTo(){if(!dynreply){var e=document.getElementById(" return dynreply;} function table_insert_row(table,header,items){var tr=document.createElement("tr");var th=document.createElement("th");th.appendChild(header);tr.appendChild(th);for(var idx=0;idx0&&y>0&&nx