From da3665f83e87e0d2dee96b1a8b72f7ade91c682c Mon Sep 17 00:00:00 2001 From: Mo Bitar Date: Wed, 5 Dec 2018 20:46:58 -0600 Subject: [PATCH] Reload via display property --- app/components/Home.jsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app/components/Home.jsx b/app/components/Home.jsx index b78e55e..dd4b575 100644 --- a/app/components/Home.jsx +++ b/app/components/Home.jsx @@ -25,15 +25,17 @@ export default class Home extends React.Component { // For some reason, scrollbars don't update when the className for this.state.platform is set dynamically. // We're doing everything right, but on Chrome Windows, the scrollbars don't reload if adding className after // the page already loaded. So this seems to work in manually reloading. - var container = document.getElementById("home"); - var content = container.innerHTML; - container.innerHTML= content; + var container = document.getElementById("main-content"); + container.style.display = "none"; + setTimeout(() => { + container.style.display = "block"; + }, 0); } render() { return (
-
+