From 641d031bdf2b0c7077816b73a932b1794fe46f51 Mon Sep 17 00:00:00 2001 From: Antti Pilto Date: Mon, 1 Oct 2018 21:19:12 +0300 Subject: [PATCH] Check start visibility more often --- src/components/ChooseCharacters/ChooseCharacters.jsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/ChooseCharacters/ChooseCharacters.jsx b/src/components/ChooseCharacters/ChooseCharacters.jsx index 2cd42b6..901c063 100644 --- a/src/components/ChooseCharacters/ChooseCharacters.jsx +++ b/src/components/ChooseCharacters/ChooseCharacters.jsx @@ -30,6 +30,10 @@ class ChooseCharacters extends Component { window.removeEventListener('scroll', this.testIsStartVisible); } + componentDidUpdate(prevProps, prevState) { + this.testIsStartVisible(); + } + testIsStartVisible() { if(this.startRef) { const rect = this.startRef.getBoundingClientRect();