Popover click scrolls to top of the page

Hi all, i am new in roots. I have installed and started using roots and i have an issue with popover. I added the below code

 $('[data-toggle="popover"]').popover({trigger: 'focus'});

in the _main.js common init: section to be included in all pages and popover and tooltip work fine. However when i click on the popover the pages scrolls to top.
Is there a way to prevent this with a return false like this? (it doesn’t work)

   $('[data-toggle="popover"]').on('show.bs.popover', function () {
 return false;

This is not Roots related, it’s a Bootstrap issue.

Thanks for the answer but how come this happens only when i switch to roots theme unedited and not to anyother theme including bootstrap?

Anyway,i’ll see if i can get some help in bootstrap related forums


It’s most likely a syntax error. Check the Bootstrap documentation.