From 25e664cae80a08377432961d64dcc6062d467c55 Mon Sep 17 00:00:00 2001 From: Michael Paradis Date: Mon, 5 Jan 2026 09:51:06 -0800 Subject: [PATCH 1/3] Change scroll behaviour test --- packages/components-native/src/Form/Form.tsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/packages/components-native/src/Form/Form.tsx b/packages/components-native/src/Form/Form.tsx index eb7c63479d..b9afa9fcc8 100644 --- a/packages/components-native/src/Form/Form.tsx +++ b/packages/components-native/src/Form/Form.tsx @@ -124,6 +124,7 @@ function InternalForm({ ios: { onKeyboardWillHide: handleKeyboardHide, onKeyboardWillShow: handleKeyboardShow, + onKeyboardWillChangeFrame: handleKeyboardWillChangeFrame, }, android: { onKeyboardDidHide: handleKeyboardHide, @@ -229,6 +230,21 @@ function InternalForm({ ); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + function handleKeyboardWillChangeFrame(frames: Record) { + if ( + frames && + "endCoordinates" in frames && + "height" in frames.endCoordinates && + typeof frames.endCoordinates.height === "number" && + frames.endCoordinates.height > keyboardHeight + ) { + handleKeyboardShow(frames); + } else { + handleKeyboardHide(); + } + } + // eslint-disable-next-line @typescript-eslint/no-explicit-any function handleKeyboardShow(frames: Record) { setKeyboardScreenY(frames.endCoordinates.screenY); From cab4e3febe1c59269f69b54e3b442122ac0a3cde Mon Sep 17 00:00:00 2001 From: Michael Paradis Date: Mon, 5 Jan 2026 11:46:35 -0800 Subject: [PATCH 2/3] Testing "did" callbacks for all --- packages/components-native/src/Form/Form.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/components-native/src/Form/Form.tsx b/packages/components-native/src/Form/Form.tsx index b9afa9fcc8..4b9a767b4d 100644 --- a/packages/components-native/src/Form/Form.tsx +++ b/packages/components-native/src/Form/Form.tsx @@ -122,9 +122,9 @@ function InternalForm({ const keyboardProps = Platform.select({ ios: { - onKeyboardWillHide: handleKeyboardHide, - onKeyboardWillShow: handleKeyboardShow, - onKeyboardWillChangeFrame: handleKeyboardWillChangeFrame, + onKeyboardDidHide: handleKeyboardHide, + onKeyboardDidShow: handleKeyboardShow, + onKeyboardDidChangeFrame: handleKeyboardDidChangeFrame, }, android: { onKeyboardDidHide: handleKeyboardHide, @@ -231,7 +231,7 @@ function InternalForm({ ); // eslint-disable-next-line @typescript-eslint/no-explicit-any - function handleKeyboardWillChangeFrame(frames: Record) { + function handleKeyboardDidChangeFrame(frames: Record) { if ( frames && "endCoordinates" in frames && From 1ab1d8407fce8e7c5ea822477740ec1d5b8f1abb Mon Sep 17 00:00:00 2001 From: Michael Paradis Date: Mon, 5 Jan 2026 11:56:25 -0800 Subject: [PATCH 3/3] Only use did change frame --- packages/components-native/src/Form/Form.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/components-native/src/Form/Form.tsx b/packages/components-native/src/Form/Form.tsx index 4b9a767b4d..d958977a2b 100644 --- a/packages/components-native/src/Form/Form.tsx +++ b/packages/components-native/src/Form/Form.tsx @@ -122,8 +122,8 @@ function InternalForm({ const keyboardProps = Platform.select({ ios: { - onKeyboardDidHide: handleKeyboardHide, - onKeyboardDidShow: handleKeyboardShow, + // onKeyboardDidHide: handleKeyboardHide, + // onKeyboardDidShow: handleKeyboardShow, onKeyboardDidChangeFrame: handleKeyboardDidChangeFrame, }, android: {