fix: Remove wire:navigate to fix MIME type error

Livewire 3's SPA navigation (wire:navigate) was causing the browser
to register document URLs as JavaScript sources, resulting in:
'Refused to execute script... MIME type text/html is not executable'

Removed wire:navigate from:
- partials/tree-item.blade.php (sidebar links)
- livewire/document-viewer.blade.php (backlinks)
- livewire/quick-switcher.blade.php (search results)

Pages will now do full page loads instead of SPA navigation.
This commit is contained in:
2025-11-29 17:40:59 +09:00
parent 9625268e67
commit a9b4b93d8c
3 changed files with 0 additions and 3 deletions

View File

@@ -53,7 +53,6 @@ class="inline-flex items-center px-4 py-2 bg-indigo-600 text-white text-sm font-
<a
href="{{ route('documents.show', $backlink) }}"
class="block p-4 bg-gray-50 rounded-lg hover:bg-gray-100 transition"
wire:navigate
>
<div class="flex items-center">
<svg class="w-4 h-4 mr-2 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">

View File

@@ -70,7 +70,6 @@ class="w-full pl-10 pr-4 py-3 border-0 focus:ring-0 text-lg"
<a
href="{{ route('documents.show', $result['slug']) }}"
class="block px-4 py-3 hover:bg-gray-50 transition {{ $index === $selectedIndex ? 'bg-indigo-50' : '' }}"
wire:navigate
@click="open = false"
>
<div class="flex items-center justify-between">

View File

@@ -10,7 +10,6 @@
<a
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"
wire:navigate
>
<svg class="w-4 h-4 mr-2 text-gray-400 group-hover:text-gray-600 flex-shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path>