negomi/react-burger-menu

Menu inside Formik

Barna001 opened this issue · 1 comments

<button id="react-burger-menu-btn" style="position: absolute; left: 0px; top: 0px; z-index: 1; width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; font-size: 0px; background: transparent; cursor: pointer;">Open Menu</button>

Nor the burger menu or the 'x' closing the menu has type="button" on it, so most browsers handle this as type="submit", which can cause false submits for example when you have a menu inside Formik or other form libs.

Hi @Barna001, oh interesting, I had not heard of someone using the menu inside Formik before :)

I have just pushed a fix which adds type="button" to each button inside the menu, so hopefully this should fix your issue.