The documentation says step placement accepts either a string or a function, but defining it as a function breaks scrollIntoView for that step – the page scrolls to the top before then scrolling to the step's element.
To fix, I added a variable placement just before the switch statement on line 638 in bootstrap-tour.js and then had the switch statement reference that variable instead of step.placement:
The documentation says step placement accepts either a string or a function, but defining it as a function breaks
scrollIntoView
for that step – the page scrolls to the top before then scrolling to the step's element.To fix, I added a variable
placement
just before the switch statement on line 638 in bootstrap-tour.js and then had the switch statement reference that variable instead ofstep.placement
:...
scrollTop = 0;
var placement = typeof step.placement === "function" ? step.placement() : step.placement;
switch (placement) {
...