I had same problem (jump to the top on click to the link which was triggering the collapse toggle)
the href="#" was changed to href="https://stackoverflow.com/questions/28977499/javascript:void(0);" and it is working great (toggling collapse without any scrolling to the top)