diff --git a/public/map.js b/public/map.js index b86c63c4..e70a8faf 100644 --- a/public/map.js +++ b/public/map.js @@ -807,7 +807,15 @@ if (cb) cb.checked = true; renderMarkers(); } - // Expose for popup onclick and testing + // Event delegation for Show Neighbors links (avoids inline onclick / global function timing issues) + document.addEventListener('click', function(e) { + var link = e.target.closest('[data-show-neighbors]'); + if (link) { + e.preventDefault(); + selectReferenceNode(link.dataset.pubkey, link.dataset.name); + } + }); + // Expose for testing window._mapSelectRefNode = selectReferenceNode; window._mapGetNeighborPubkeys = function() { return neighborPubkeys ? Array.from(neighborPubkeys) : []; }; @@ -838,7 +846,7 @@
View Node → - ${node.public_key ? ` · Show Neighbors` : ''} + ${node.public_key ? ` · Show Neighbors` : ''}
`; } diff --git a/public/style.css b/public/style.css index 6c211794..d8349588 100644 --- a/public/style.css +++ b/public/style.css @@ -630,6 +630,15 @@ button.ch-item.selected { background: var(--selected-bg); } background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 8px; } +/* Bug 7 fix: neighbor table text inherits accent color — force readable text */ +.node-detail-section .data-table td, +.node-full-card .data-table td { + color: var(--text); +} +.node-detail-section .data-table td a, +.node-full-card .data-table td a { + color: var(--accent); +} .node-detail-section h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); margin-bottom: 8px; padding-bottom: 4px;