Preserve sidebar scroll position when navigating between documents
- Add x-navigate:scroll directive to sidebar container to maintain scroll position - Add x-navigate:scroll to all document links in sidebar (tree-item.blade.php) - Add x-navigate:scroll to 'New Document' button - When clicking a link in sidebar, the sidebar scroll position is now preserved during page navigation - Fixes issue where sidebar would scroll to top after loading a document
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
@auth
|
||||
<div class="mt-6 pt-6 border-t border-gray-200">
|
||||
<a
|
||||
x-navigate:scroll
|
||||
href="{{ route('documents.create') }}"
|
||||
class="flex items-center justify-center px-4 py-2 text-sm font-medium text-white bg-indigo-600 rounded-md hover:bg-indigo-700"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user