I have a fixed header and container div has scroll.
On click of a button I'm trying to add dynamic content on top it. Expected behavior is when dynamic content is added on top of button, button should be pushed down to make space for new element. This works fine in Firefox. But in Chrome button stays at the same place and browser scrolls upward.
Here is the codesandbox
https://codesandbox.io/s/nifty-allen-gtklp
Scroll down and click on the toggle button. Observe the behavior in Chrome and Firefox.
Anybody knows why the behavior is different?