`unload()` destroys the app on link clicks that may never navigate
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
Research direction
Start by tracing the isNewPageClick path and its synchronous unload(), destroyAllViews, and disconnect calls. Reproduce both the Content-Disposition attachment case and a cancelled beforeunload dialog, then verify teardown occurs only after navigation is confirmed while the cancelled page remains functional.
Written by the indexing model from the issue text.
Description
Environment
- Elixir version (please paste the output of
elixir -v): any
- Phoenix and LiveView versions (
mix deps | grep -w 'phoenix\|phoenix_live_view'): latest
- Operating system: any
- Browsers (including version) you attempted to reproduce this bug on (the more the merrier): any
Actual behavior
isNewPageClick synchronously runs unload() (destroyAllViews, disconnect) before navigation is certain. What triggers the bug: a same-origin anchor whose action responds with Content-Disposition: attachment (no download attribute), or the user cancelling a beforeunload dialog on an external link.
Impact: all views destroyed and socket disconnected while a dead page stays on screen
Expected behavior
Tear down once the browser confirms the document is being left
- Dominant language
- Elixir
- Stars
- 6.8k
- Forks
- 1.1k
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 19
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phoenixframework/phoenix_live_view
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
phoenixframework/phoenix_live_view#4509 ·
Maintainers usually reply within 1 day
-
awaiting feedback needs more info
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
phoenixframework/phoenix_live_view#4407 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
phoenixframework/phoenix_live_view#4507 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
phoenixframework/phoenix_live_view#4506 ·
Maintainers usually reply within 1 day
-
Focused input with `phx-patch-focused` loses typed chars when a `phx-change` reply lands mid-typingOpen
Difficulty 4/5 3-5 days Newbie friendliness 65/100
phoenixframework/phoenix_live_view#4504 ·
Maintainers usually reply within 1 day
All issues in phoenixframework/phoenix_live_view
Similar issues
-
Bug: Table layout and date column are cut off on mobile screens on the Tournaments -> History pageOpenbug
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
hexlet-codebattle/codebattle#2375 ·
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wintermeyer/vutuv#2388 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Broadcast API docs say to prepend realtime: to the topic, which breaks deliveryPossibly taken @mandar1045 claimed this 1 day ago. Open
Difficulty 1/5 Under an hour Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
camelToSnake and snakeCamelMapper() drop the underscore when a digit precedes a camelCase boundaryOpen
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
electric-sql/electric#4855 ·