Back out "Fixed scrollview inset when RN view is embedded in another view"

Summary:
Original commit changeset: fbd72739fb71

Changelog: Back out "[react-native][PR] Fixed scrollview inset when RN view is embedded in another view"

Reviewed By: TheSavior

Differential Revision: D20878607

fbshipit-source-id: 0d77b9fb08c637f7894c399a219a242e472b0700
This commit is contained in:
Xiaoyu Yin 2020-04-06 15:48:13 -07:00 коммит произвёл Facebook GitHub Bot
Родитель ff38f47b60
Коммит a37e45a57e
1 изменённых файлов: 1 добавлений и 22 удалений

Просмотреть файл

@ -118,28 +118,7 @@ class KeyboardAvoidingView extends React.Component<Props, State> {
_onLayout = (event: ViewLayoutEvent) => {
this._frame = event.nativeEvent.layout;
let isInitial = !this._initialFrameHeight;
if (this.viewRef.current !== null) {
// Try to measure inside the window, not the view controller
this.viewRef.current.measureInWindow((x, y, width, height) => {
const frame: ViewLayout = {
x: x,
y: y,
width: width,
height: height,
};
this._frame = frame;
if (isInitial) {
// save the initial frame height, before the keyboard is visible
this._initialFrameHeight = frame.height;
}
});
}
if (isInitial) {
if (!this._initialFrameHeight) {
// save the initial frame height, before the keyboard is visible
this._initialFrameHeight = this._frame.height;
}