Skip to content

Commit

Permalink
Merge pull request coollabsio#2374 from coollabsio/revert-2365-fix-na…
Browse files Browse the repository at this point in the history
…vbar-scroll

Revert "Enhancement: Preserve scroll position in navbar to improve UX"
  • Loading branch information
andrasbacsai authored Jun 7, 2024
2 parents 952aed3 + d9f1a7c commit 3152ce1
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions resources/views/components/navbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,8 @@
this.theme = 'system';
document.documentElement.classList.remove('dark');
}
},
saveScrollPosition() {
localStorage.setItem('navbarScrollPosition', this.$refs.navbar.scrollTop);
},
restoreScrollPosition() {
this.$nextTick(() => {
this.$refs.navbar.scrollTop = localStorage.getItem('navbarScrollPosition') || 0;
});
}}" @livewire:load="restoreScrollPosition()" @livewire:update="saveScrollPosition()">
}
}">
<div class="flex pt-6 pb-4 pl-3">
<div class="flex flex-col w-full">
<div class="text-2xl font-bold tracking-wide dark:text-white">Coolify</div>
Expand Down Expand Up @@ -90,7 +83,7 @@
<div class="px-2 pt-2 pb-7">
<livewire:switch-team />
</div>
<ul role="list" class="flex flex-col flex-1 gap-y-7" x-ref="navbar">
<ul role="list" class="flex flex-col flex-1 gap-y-7">
<li class="flex-1 overflow-x-hidden">
<ul role="list" class="flex flex-col h-full space-y-1.5">
@if (isSubscribed() || !isCloud())
Expand Down Expand Up @@ -427,4 +420,4 @@ class="flex items-center px-6 py-3 text-sm font-semibold leading-6 text-gray-900
</a>
</li> --}}
</ul>
</nav>
</nav>

0 comments on commit 3152ce1

Please sign in to comment.