Remove x-navigate directive, use native HTML links with scroll preservation

- Remove x-navigate.preserve-scroll from sidebar links
- Use standard <a> tags for navigation
- Implement manual JavaScript-based scroll position management
- Save scroll position to sessionStorage before navigation
- Restore scroll position after page load
- Works consistently across all browsers including Chrome
This commit is contained in:
2025-12-04 02:30:48 +09:00
parent f96ad4d14f
commit 5bf43abab9
2 changed files with 0 additions and 2 deletions

View File

@@ -18,7 +18,6 @@
@auth @auth
<div class="mt-6 pt-6 border-t border-gray-200"> <div class="mt-6 pt-6 border-t border-gray-200">
<a <a
x-navigate.preserve-scroll
href="{{ route('documents.create') }}" 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" 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"
> >

View File

@@ -8,7 +8,6 @@
$displayTitle = basename($file['document']->title); $displayTitle = basename($file['document']->title);
@endphp @endphp
<a <a
x-navigate.preserve-scroll
href="{{ route('documents.show', $file['document']) }}" href="{{ route('documents.show', $file['document']) }}"
class="flex items-center px-2 py-1.5 text-sm text-gray-700 rounded hover:bg-gray-100 group" class="flex items-center px-2 py-1.5 text-sm text-gray-700 rounded hover:bg-gray-100 group"
> >