Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

Commit 0ffc5c6

Browse files
committed
fix: avoid tab bar flash on keyboard shown
closes #43
1 parent e79e2ab commit 0ffc5c6

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/views/MaterialBottomTabView.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,13 @@ export default class MaterialBottomTabView extends React.Component<Props> {
108108

109109
const isVisible = this._isVisible();
110110
const extraStyle: ViewStyle | null =
111-
typeof isVisible === 'boolean'
112-
? { display: isVisible ? undefined : 'none' }
111+
isVisible === false
112+
? {
113+
display: 'none',
114+
// When keyboard is shown, `position` is set to `absolute` in the library
115+
// This somehow breaks `display: 'none'`, so we explcitely override `position`
116+
position: undefined,
117+
}
113118
: null;
114119

115120
return (

0 commit comments

Comments
 (0)