bootstrap-without-jquery icon indicating copy to clipboard operation
bootstrap-without-jquery copied to clipboard

Toggle navigation Button Bug

Open sunanan opened this issue 8 years ago • 1 comments

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 toggle navigation button

sunanan avatar Apr 15 '16 19:04 sunanan

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); } }

sunanan avatar Apr 15 '16 20:04 sunanan