From 2dc026918ace347d1c65e1dacb6b940e35a1eaec Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Wed, 10 May 2017 15:01:46 -0400 Subject: [PATCH] Wallets: fix accidental wallet hiding on category change Closes #1493 When a wallet was selected on mobile displays, its entry was copied to another part of the page with its element id intact. When a category was changed, it prevented duplicate entries from being shown by searching the page for matching ids, which unintentionally matched the copied element. This patch changes the id of the copied entry during the copy operation. --- js/main.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/main.js b/js/main.js index 7e189bca..f6a15a13 100644 --- a/js/main.js +++ b/js/main.js @@ -389,6 +389,7 @@ function walletListener(e) { if (isMobile()) { var p = document.getElementById('walletsmobile'); t = t.cloneNode(true); + t.id = 'inline_wallet_box'; p.innerHTML = ''; p.appendChild(t); scrollToNode(p); @@ -467,6 +468,7 @@ function walletShowPlatform(platform) { for (var i = 0, nds = document.getElementById('walletsswitch').childNodes, n = nds.length; i < n; i++) { if (nds[i].nodeType !== 1) continue; var id = nds[i].id.split('-')[1]; + // for wallets with multiple listings, only show one instance per view if (document.getElementById('wallet-' + id)) continue; var nd = null; for (var ii = 0, nn = platforms.length; ii < nn; ii++) {