contenteditable cursor can enter blank elements, refactor