diff --git a/src/Uno.UI/UI/Xaml/Controls/ScrollContentPresenter/ScrollContentPresenter.wasm.cs b/src/Uno.UI/UI/Xaml/Controls/ScrollContentPresenter/ScrollContentPresenter.wasm.cs index c9847b132d24..ba9bafb9800b 100644 --- a/src/Uno.UI/UI/Xaml/Controls/ScrollContentPresenter/ScrollContentPresenter.wasm.cs +++ b/src/Uno.UI/UI/Xaml/Controls/ScrollContentPresenter/ScrollContentPresenter.wasm.cs @@ -216,13 +216,18 @@ public void ScrollTo(double? horizontalOffset, double? verticalOffset, bool disa rootFwElt.LayoutUpdated += TryProcessScrollTo; } - // As the native ScrollTo is going to be async, we manually raise the event with the provided values. - // If those values are invalid, the browser will raise the final event anyway. - (TemplatedParent as ScrollViewer)?.OnScrollInternal( - horizontalOffset ?? GetNativeHorizontalOffset(), - verticalOffset ?? GetNativeVerticalOffset(), - isIntermediate: false - ); + if (disableAnimation) + { + // As the native ScrollTo is going to be async, we manually raise the event with the provided values. + // If those values are invalid, the browser will raise the final event anyway. + // Note: If the caller has allowed animation, we assume that it's not interested by a sync response, + // we prefer to wait for the browser to effectively scroll. + (TemplatedParent as ScrollViewer)?.OnScrollInternal( + horizontalOffset ?? GetNativeHorizontalOffset(), + verticalOffset ?? GetNativeVerticalOffset(), + isIntermediate: false + ); + } } }