mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
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.
This commit is contained in:
parent
a702d178a0
commit
2dc026918a
1 changed files with 2 additions and 0 deletions
|
@ -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++) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue