From 922bbb17987f64f6bc9f1546e0cfb8ce610ecade Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 2 Nov 2017 16:43:32 +0100 Subject: [PATCH] [iOS] use display: 'none' to hide elements (#2128) * [iOS] use display: 'none' to hide elements No, it still doesn't work properly on some Android devices, sigh. --- react/features/base/react/components/native/Container.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/react/features/base/react/components/native/Container.js b/react/features/base/react/components/native/Container.js index 1de76511e..0cb3bd5e0 100644 --- a/react/features/base/react/components/native/Container.js +++ b/react/features/base/react/components/native/Container.js @@ -39,18 +39,16 @@ export default class Container extends AbstractContainer { // visible if (!visible) { - // FIXME: Whatever I try ends up failing somehow on Android, give up - // for now, hoping display: 'none' solves this. + // FIXME: It turns out that display: none will fail on some Android + // devices, but work on the others (currently fails on Google Pixel) if (Platform.OS === 'android') { return null; } // Intentionally hide this Container without destroying it. - // TODO Replace with display: 'none' supported in RN >= 0.43. props.style = { ...props.style, - height: 0, - width: 0 + display: 'none' }; }