Skip to content

Commit bf3b0ae

Browse files
committed
fix: add static value for default case too and revert testing change
1 parent 5ff2e03 commit bf3b0ae

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

package/src/components/KeyboardCompatibleView/KeyboardCompatibleView.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,7 @@ export class KeyboardCompatibleView extends React.Component<
6262
return 0;
6363
}
6464

65-
const keyboardY =
66-
(keyboardFrame.height && Platform.OS === 'android'
67-
? Math.min(keyboardFrame.screenY, keyboardFrame.height)
68-
: keyboardFrame.screenY) - (this.props.keyboardVerticalOffset ?? 0);
65+
const keyboardY = keyboardFrame.screenY - (this.props.keyboardVerticalOffset ?? 0);
6966
const relativeHeight = frame.y + frame.height - keyboardY;
7067

7168
/**
@@ -263,7 +260,7 @@ export class KeyboardCompatibleView extends React.Component<
263260

264261
default:
265262
return (
266-
<KeyboardProvider value={{ dismissKeyboard: this.dismissKeyboard }}>
263+
<KeyboardProvider value={this.keyboardContextValue}>
267264
<View onLayout={this._onLayout} ref={this.viewRef} style={style} {...props}>
268265
{children}
269266
</View>

0 commit comments

Comments
 (0)