`getCaretCoordinates`'s performance is improved 5x on average after this patch due to reduced forced reflows of the layout.