Fix the caret off-by-one bug: make sure we update layout before setting new caret position CCBUG:48302 CCBUG:177245
Changed paths: