Hi,
If you are using the Bootstrap addon, you need to use <span class="caret"></span>
inside the parent item links for the carets and then it should work fine. Because when you add the carets via CSS with a::after
the script cannot differentiate between a click on the link and the caret pseudo element.
Cheers!