In particular, my problem is that I have a toggle button that I use to switch between the two user interfaces. And this toggle button is a child of the updated user interface. When I scroll a little from the main user interface and switch to a higher view, it scrolls up. It does not do it otherwise, and when the scroll location is above the main user interface.
To see it in action, click on this version of the project , select the item below Explore panelon the left, scroll down a bit, and click the toggle button next to the Compareright.
It only scrolls when I upgrade from a lower user interface to a higher user interface.
I read that a problem with preventDefault()may not be a problem , but I have it from the very beginning.
My handler:
handleCompareToggleClick: function(e) {
e.preventDefault();
this.setState({compare: !this.state.compare});
},
In fact, my source code is huge, so you can find it here . The toggle button refers to ResultGroupTitle, and the updated interface to ResultGroup.
source
share