Skip to content

Commit 3e8fbec

Browse files
authored
fix: remove clickable row navigation (#54)
1 parent fa74e5e commit 3e8fbec

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

scripts/generators/html/quarterly-reports-html-generator.js

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ ${navHtmlForReports}
486486
const safeTitle = sanitizeAttribute(item.title);
487487

488488
// Row with data-href to enable click navigation.
489-
tableContent += ` <tr class="${rowBg} table-row-hover" style="transition: background-color 0.15s ease-in-out; cursor: pointer;" data-href="${item.url}">\n`;
489+
tableContent += ` <tr class="${rowBg} table-row-hover" style="transition: background-color 0.15s ease-in-out;">\n`;
490490

491491
// No. column (not sortable).
492492
tableContent += ` <td>${counter++}.</td>\n`;
@@ -614,29 +614,6 @@ ${navHtmlForReports}
614614
}
615615
window.addEventListener('DOMContentLoaded', openSectionFromHash);
616616
window.addEventListener('hashchange', openSectionFromHash);
617-
618-
// Add click and keyboard listeners to table rows to navigate to the item's URL.
619-
document.addEventListener('DOMContentLoaded', () => {
620-
const tableRows = document.querySelectorAll('.table-row-hover');
621-
tableRows.forEach(row => {
622-
const href = row.getAttribute('data-href');
623-
if (href) {
624-
row.tabIndex = 0;
625-
row.setAttribute('role', 'button');
626-
row.addEventListener('click', (e) => {
627-
// Prevent navigation if text is selected
628-
if(window.getSelection().toString().length > 0) return;
629-
window.location.href = href;
630-
});
631-
row.addEventListener('keydown', (e) => {
632-
if (e.key === 'Enter' || e.key === ' ') {
633-
e.preventDefault();
634-
window.location.href = href;
635-
}
636-
});
637-
}
638-
});
639-
});
640617
</script>
641618
${footerHtml}
642619
</body>

0 commit comments

Comments
 (0)