#[Url] property + wire:model causes full page reload on pages with wire:navigate
Livewire version
v4.4.6
Laravel version
v13.33.0
PHP version
8.4.21
Browser and operating system
Chrome on Windows 11
Describe the issue you're experiencing
On a page rendered under a layout that uses wire:navigate on at least one link (even one completely unrelated to the component below), a property bound with #[Url] + wire:model/wire:model.live causes a full browser page reload the first time its value changes, instead of just updating the query string with history.replaceState.
Confirmed with Chrome DevTools:
- The click/keystroke that changes the property is followed by a real top-level navigation (
performance.getEntriesByType('navigation')[0].type === 'reload', network request hassec-fetch-mode: navigate, every static asset gets refetched). - No
POSTto the Livewire update endpoint appears in the network log before the reload — the reload happens purely client-side. - Removing
#[Url]from the property (keeping everything else, includingwire:navigateelsewhere on the page) fixes it completely: the property updates normally viahistory.replaceState, no reload. - Switching
wire:model.liveto plainwire:model(deferred) does not help — the reload still happens on the next commit, so it's not about live vs. deferred. - The bug is not related to any specific component (I first found it with a third-party date-range picker using
x-teleport, but a plain<input wire:model.live>reproduces it identically with no teleport involved — see repro below).
Code snippets to reproduce the issue
Any layout that has a wire:navigate link, e.g.:
{{-- layout.blade.php --}}
<html>
<head>@livewireStyles</head>
<body>
<a href="/somewhere" wire:navigate>Somewhere</a>
{{ $slot }}
@livewireScripts
</body>
</html>A component rendered under that layout:
<?php
use Livewire\Attributes\Layout;
use Livewire\Attributes\Url;
use Livewire\Component;
new #[Layout('layout')] class extends Component {
#[Url]
public string $search = '';
}; ?>
<div>
<input type="text" wire:model.live="search">
</div>Steps:
- Load the component's page (the layout's
wire:navigatelink never needs to be clicked — its mere presence in the DOM is enough). - Type a character into the input.
- Watch the Network tab.
Screenshots/screen recordings
N/A — happy to record a GIF if useful, but the DevTools evidence above (navigation.type === 'reload', sec-fetch-mode: navigate, full asset refetch, no prior XHR/fetch to the Livewire update endpoint) should be enough to reproduce.
How do you expect it to work?
Typing into the input should update the search property and reflect it in the URL via history.replaceState (or pushState if history: true is set), exactly like it does when the page's layout has no wire:navigate links at all. It should not trigger a full page reload.
Workaround
Removing #[Url] from the affected properties avoids the reload, at the cost of losing the shareable/bookmarkable query string for those properties.
Source: livewire/livewire