diff --git a/frontend/main.ts b/frontend/main.ts index b08912a..5714528 100644 --- a/frontend/main.ts +++ b/frontend/main.ts @@ -103,7 +103,8 @@ function initSidebar() { if(triggerElement.dataset.trigger) { const sidebar = new Sidebar(triggerElement.dataset.trigger); - triggerElement.addEventListener('click', () => { + triggerElement.addEventListener('click', (e) => { + e.preventDefault(); if(triggerElement.dataset.trigger === 'addTrip') { initTripSidebar(triggerElement); }