Retain focus while changing DOM in OrderedLayout (#12967)

Change-Id: Id25177a2dfecc2d0d3b8bb5803656a39bec9c5d6