The HTML toggle button seems to have a bug when used in conjunction with the pin feature.
If HTML is toggled on while adding a new card, the toggle state should remain the same after the card is added. For example, if HTML is active and you press Ctrl + Enter, the HTML field should remain visible. This is the desired behavior when adding cards in batches.
However, if a field is pinned while HTML is active and then Ctrl + Enter is pressed, all active HTML fields collapse unexpectedly.
In my tests, this seems to only occur for the very first note being added after pinning or unpinning a field (the field being pinned/unpinned doesn’t need to be the same as the one that has the HTML editor active).