Skip to content

Commit 5d4e820

Browse files
[FIX] Empty space on Messagebox (#2704)
Co-authored-by: Diego Mello <diegolmello@gmail.com>
1 parent f5b9dc6 commit 5d4e820

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

app/containers/MessageBox/index.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, { Component } from 'react';
22
import PropTypes from 'prop-types';
33
import {
4-
View, Alert, Keyboard, NativeModules, Text
4+
View, Alert, Keyboard, NativeModules, Text, InteractionManager
55
} from 'react-native';
66
import { connect } from 'react-redux';
77
import { KeyboardAccessoryView } from 'react-native-ui-lib/keyboard';
@@ -222,9 +222,14 @@ class MessageBox extends Component {
222222
}
223223

224224
this.unsubscribeFocus = navigation.addListener('focus', () => {
225-
if (this.tracking && this.tracking.resetTracking) {
226-
this.tracking.resetTracking();
227-
}
225+
// didFocus
226+
// We should wait pushed views be dismissed
227+
InteractionManager.runAfterInteractions(() => {
228+
if (this.tracking && this.tracking.resetTracking) {
229+
// Reset messageBox keyboard tracking
230+
this.tracking.resetTracking();
231+
}
232+
});
228233
});
229234
this.unsubscribeBlur = navigation.addListener('blur', () => {
230235
this.component?.blur();

0 commit comments

Comments
 (0)