bootstrap-without-jquery
bootstrap-without-jquery copied to clipboard
Toggle navigation Button Bug
I just try your Bootstrap 3 demo https://tagawa.github.io/bootstrap-without-jquery/bootstrap3/demo/
when I change the window size to small, I will the see the Toggle navigation Button. that's normal. now, I hit the button many times quickly. the button will be frozen.
so if I refresh the page, and click the button slowly, one by one. the button is working fine. I use your Js in my project. my daughter find the problem. you know, the kids always like click sound.
my system is windows 7 with chrome
Got it. find the bug in doCollapse function. before:
if (dataTarget.classList.contains('in')) { hide(dataTarget, targets.evTarget); } else { show(dataTarget, targets.evTarget); }
after
if (!dataTarget.classList.contains('collapsing')) { if (dataTarget.classList.contains('in')) { hide(dataTarget, targets.evTarget); } else { show(dataTarget, targets.evTarget); } }