-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Environment
- Elixir version (elixir -v):
1.18.4-erlang-27.3.4.1
- Phoenix version (mix deps):
1.7.21
(also confirmed on1.8.0-rc.3
) - Phoenix LiveView version (mix deps):
1.0.7
(also confirmed on1.0.17
) - Operating system:
debian-bullseye-20250630-slim
- Browsers you attempted to reproduce this bug on (the more the merrier): Safari on iPhone
- Does the problem persist after removing "assets/node_modules" and trying again? Yes/no: yes
Actual behavior
On a freshly created liveview app, when reopening a liveview tab on mobile after a while (switching to tabs/apps in btw or locking/unlocking), a full reload is triggered, losing client state and flashing an error message.

I managed to consistently reproduce it on an iPhone with the following steps (unlocking is more predictable than switching tabs):
- open the tab
- lock the phone with the side button
- wait ~10s
- unlock the phone
This issue is being discussed on https://elixirforum.com/t/mobile-tab-switching-triggers-full-page-reload-in-liveview-is-this-expected-behavior/71188.
As far as I can tell, older versions of liveview (at least livebeats, released a year ago?) don't seem impacted.
Expected behavior
No full-reload, no error message.
diegonogueira