Possible bug with Live View after submitting a form?

After I submit the form and get back the reply from the server I get different html rendered depending on the browser.

On Firefox:

<form 
  action="#" 
  method="post" 
  phx-submit="add" 
  data-phx-component="0" 
  id="phx-FhlHDAHvTJUEJQ4B-0-0"
 >
...
</form>

Chrome:

<form 
  action="#" 
  method="post" 
  phx-submit="add" 
  data-phx-component="0" 
  id="phx-FhlG7D6BwymUzA2B-0-0" 
  phx-page-loading=""
>
...
</form>

So if you have not notice yet the difference is that phx-page-loading="" only shows up in Chrome, but not on Firefox.

On Firefox the form input field is clean after submit, but on Chrome it keeps the input I have submitted.

So I am not sure if this is related or not with the phx-page-loading="" different beahviour between both.

Does anyone have a clue of what is going here?

no, and it may very well be a bug in live view. I don’t think we will solve it without you creating some sort of demo repo that we could run and try ourselves…

1 Like