mirror of
https://github.com/System-End/YSWS-Catalog.git
synced 2026-04-19 19:55:07 +00:00
Prevent click event propagation on program card links
This commit is contained in:
parent
1501e0ee57
commit
988d82986e
1 changed files with 4 additions and 0 deletions
|
|
@ -547,6 +547,10 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||
});
|
||||
|
||||
document.addEventListener('click', (e) => {
|
||||
if (e.target.closest('.program-card') && e.target.closest('a')) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.target.closest('.program-card')) {
|
||||
const encodedProgram = e.target.closest('.program-card').dataset.program;
|
||||
const program = JSON.parse(decodeURIComponent(encodedProgram));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue