From f0fe1cc416e3da6a18d32ce4a95c64de3c4890aa Mon Sep 17 00:00:00 2001 From: Abhijeet Jha <74712637+iamAbhi-916@users.noreply.github.com> Date: Wed, 15 Apr 2026 10:44:42 +0530 Subject: [PATCH] Fix ScrollView keyboard scroll drift on long key press (#15988) * Fix ScrollView keyboard scroll drift on long key press * Change files --- ...tive-windows-c5ccd437-3b14-4157-926e-e9c76f440c38.json | 7 +++++++ .../Fabric/Composition/ScrollViewComponentView.cpp | 8 ++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 change/react-native-windows-c5ccd437-3b14-4157-926e-e9c76f440c38.json diff --git a/change/react-native-windows-c5ccd437-3b14-4157-926e-e9c76f440c38.json b/change/react-native-windows-c5ccd437-3b14-4157-926e-e9c76f440c38.json new file mode 100644 index 00000000000..8f7e34b6bb3 --- /dev/null +++ b/change/react-native-windows-c5ccd437-3b14-4157-926e-e9c76f440c38.json @@ -0,0 +1,7 @@ +{ + "type": "prerelease", + "comment": "Fix ScrollView keyboard scroll drift on long key press", + "packageName": "react-native-windows", + "email": "74712637+iamAbhi-916@users.noreply.github.com", + "dependentChangeType": "patch" +} diff --git a/vnext/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp b/vnext/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp index 98044499fa0..2e9905ed190 100644 --- a/vnext/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp +++ b/vnext/Microsoft.ReactNative/Fabric/Composition/ScrollViewComponentView.cpp @@ -1023,16 +1023,16 @@ void ScrollViewComponentView::OnKeyDown( args.Handled(pageUp(true)); break; case winrt::Windows::System::VirtualKey::Up: - args.Handled(lineUp(true)); + args.Handled(lineUp(false)); break; case winrt::Windows::System::VirtualKey::Down: - args.Handled(lineDown(true)); + args.Handled(lineDown(false)); break; case winrt::Windows::System::VirtualKey::Left: - args.Handled(lineLeft(true)); + args.Handled(lineLeft(false)); break; case winrt::Windows::System::VirtualKey::Right: - args.Handled(lineRight(true)); + args.Handled(lineRight(false)); break; }