Update the dom caret after every render