From 0ffc5c6896d4faac7ff3ba60c4c29c3e767ec58a Mon Sep 17 00:00:00 2001 From: "satyajit.happy" Date: Tue, 29 Oct 2019 02:22:14 +0100 Subject: [PATCH] fix: avoid tab bar flash on keyboard shown closes #43 --- src/views/MaterialBottomTabView.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/views/MaterialBottomTabView.tsx b/src/views/MaterialBottomTabView.tsx index 619ce7f..2946123 100644 --- a/src/views/MaterialBottomTabView.tsx +++ b/src/views/MaterialBottomTabView.tsx @@ -108,8 +108,13 @@ export default class MaterialBottomTabView extends React.Component { const isVisible = this._isVisible(); const extraStyle: ViewStyle | null = - typeof isVisible === 'boolean' - ? { display: isVisible ? undefined : 'none' } + isVisible === false + ? { + display: 'none', + // When keyboard is shown, `position` is set to `absolute` in the library + // This somehow breaks `display: 'none'`, so we explcitely override `position` + position: undefined, + } : null; return (