Demonstrates a bug on first LV reconnect after a netsplit.
- Install prerequisites (see
.tool-versions
) - Start the server with
iex -S mix phx.server
- Visit
localhost:4000
- Click on the radio button to select an option.
- In the browser console run
liveSocket.disconnect()
, and thenliveSocket.connect()
.
The selection will be cleared, because the change event is not fired (as can be seen by a lack of any output in the iex session after the last connect). If you now select something again and repeat the step 5, the change event will be fired, and the selection will not be cleared.
The bug can be reproduced by refreshing the page. No need to restart the server.
I've tested this on the Firefox and Chromium browsers.