Fixed edge case when moving the cursor after the last char of a text node.