Open pierreonthenet opened 4 years ago
Just came across this issue, as it's been bugging me for days now. Hopefully a fix can be put in as anything I've tried has failed so far :(
Add this before the code you pasted:
var autoToken = /\s?auto?\s?/i;
var autoPlace = autoToken.test(step.placement);
if (autoPlace) step.placement = step.placement.replace(autoToken, '') || 'top';
or, simply:
step.placement = step.placement.replace(/\s?auto?\s?/i, '') || 'top';
When placement of a step is set to "auto", the scroll to this step won't work : we need to set it to top, bottom, left or right. If "auto" is set, then it will scroll to 0 (the top of page).
Here is the code in Tour.prototype._scrollIntoView (v0.12.0) :