From dbbd9d0252c082e5a0ed94cb084130620f3c236e Mon Sep 17 00:00:00 2001 From: Stepan Kuzmin Date: Tue, 28 Mar 2023 15:28:23 +0300 Subject: [PATCH] Remove panning inertia when prefers reduced motion is enabled --- src/ui/handler_inertia.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ui/handler_inertia.js b/src/ui/handler_inertia.js index 643477b2978..6f22a3ce34e 100644 --- a/src/ui/handler_inertia.js +++ b/src/ui/handler_inertia.js @@ -70,6 +70,10 @@ export default class HandlerInertia { } _onMoveEnd(panInertiaOptions?: DragPanOptions): ?(EasingOptions & {easeId?: string}) { + if (browser.prefersReducedMotion) { + return; + } + this._drainInertiaBuffer(); if (this._inertiaBuffer.length < 2) { return;