When I put the cursor before the first entity and start typing, that line is removed and the cursor jumps to the beginning of the code.
(above: seems like animated GIFs do not play as expected?)
This happens quite often.
Platform: Macbook, latest MacOS. Happens with: Firefox, Safari and Chrome
The codeblocks plugin Home Assistant uses for code editing is incredibly buggy. Sometimes it even types backwards. These are all upstream faults and beyond Home Assistant’s control.
The only solution is to refresh the page and try again.