From cc505f4d4a683c67af6ced7b6caa60339688db31 Mon Sep 17 00:00:00 2001 From: Nils Schneider Date: Mon, 6 Jul 2015 22:30:45 +0200 Subject: [PATCH] infobox: ensure sidebar box is visible on create --- lib/infobox/main.js | 1 + lib/sidebar.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/infobox/main.js b/lib/infobox/main.js index c119cca..14590a0 100644 --- a/lib/infobox/main.js +++ b/lib/infobox/main.js @@ -13,6 +13,7 @@ define(["infobox/link", "infobox/node"], function (Link, Node) { function create() { destroy() + sidebar.ensureVisible() sidebar.hide() el = document.createElement("div") diff --git a/lib/sidebar.js b/lib/sidebar.js index e917ec7..464c0fa 100644 --- a/lib/sidebar.js +++ b/lib/sidebar.js @@ -30,6 +30,10 @@ define([], function () { d.render(container) } + self.ensureVisible = function () { + sidebar.classList.remove("hidden") + } + self.hide = function () { container.classList.add("hidden") }