[BUGFIX] scroll issue sidebar after init

This commit is contained in:
Marie Birner 2023-04-08 07:35:49 +02:00
parent 8f5c0f1b05
commit 0bac385876

View File

@ -103,7 +103,8 @@ function initSidebar() {
if(triggerElement.dataset.trigger) { if(triggerElement.dataset.trigger) {
const sidebar = new Sidebar(triggerElement.dataset.trigger); const sidebar = new Sidebar(triggerElement.dataset.trigger);
triggerElement.addEventListener('click', () => { triggerElement.addEventListener('click', (e) => {
e.preventDefault();
if(triggerElement.dataset.trigger === 'addTrip') { if(triggerElement.dataset.trigger === 'addTrip') {
initTripSidebar(triggerElement); initTripSidebar(triggerElement);
} }