From 1f88d1f2ba1e304abe4cd20f0bd3aae9347f4be8 Mon Sep 17 00:00:00 2001 From: Nicolai Tellefsen Date: Wed, 23 Mar 2016 10:07:43 +0100 Subject: NMS: Fix comments not triggering after "tab" switching --- web/nms.gathering.org/js/nms-info-box.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/nms.gathering.org/js') diff --git a/web/nms.gathering.org/js/nms-info-box.js b/web/nms.gathering.org/js/nms-info-box.js index 304a8d9..623f6be 100644 --- a/web/nms.gathering.org/js/nms-info-box.js +++ b/web/nms.gathering.org/js/nms-info-box.js @@ -218,6 +218,7 @@ nmsInfoBox._windowTypes.switchInfo = { return this.childContent; }, showComments: function() { + var oldView = this.activeView; this.activeView = "comments"; var domObj = document.createElement("div"); var comments = []; @@ -233,7 +234,7 @@ nmsInfoBox._windowTypes.switchInfo = { this.commentsHash = false; // We have data, but its old, so don't change data - } else if(this.commentsHash != false && this.commentsHash == nmsData.comments.hash) { + } else if(oldView == "comments" && this.commentsHash != false && this.commentsHash == nmsData.comments.hash) { return; // We have data, refresh -- cgit v1.2.3