html: fix moving out of the hidden state