To run this test, copy some text, paste it into the box below, and then undo. The caret should be positioned respecting the box's border and padding.