negomi / react-burger-menu

:hamburger: An off-canvas sidebar component with a collection of effects and styles using CSS transitions and SVG path animations
http://negomi.github.io/react-burger-menu/
MIT License
5.04k stars 582 forks source link

Scale-Rotate Menu bugs out when one its items is a button with a scrollIntoView function attached to it #373

Closed LeroyHutchinsonJ closed 4 years ago

LeroyHutchinsonJ commented 4 years ago

On my webapp, I use the scale-rotate menu, in the menu I have a button that scrolls the page vertically.

This bug sorta came out of nowhere, my page was working fine about eight months or so ago, but recently for some reason when ever I click a button with a scrollIntoView function attached, the page shifts slightly to the left, other than scalePush, I dont seem to have this issue with the other menus.

This is the function attached to the button that is giving me this issue.

var scrollToIntro = () => { var intro = document.getElementById("introduction"); intro.scrollIntoView({ block: "start", behavior: "smooth" }); };

negomi commented 4 years ago

Hey @LeroyHutchinsonJ,

Thanks for reporting. I was able to reproduce this with:

I don't have an immediate solution (I'm actually not sure how possible it is to make browsers handle all of these things together smoothly), but I'll leave this open as a bug 😃

LeroyHutchinsonJ commented 4 years ago

Darn, but thanks for the reply!

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.