usablica / intro.js

Lightweight, user-friendly onboarding tour library
http://introjs.com
Other
22.8k stars 2.59k forks source link

scrollToElement is not working on Tables using Programmatic defining using JSON #492

Closed esstein closed 3 years ago

esstein commented 8 years ago

The scrolling doesn't works with this code:

var intro = introJs();
intro.setOptions({
steps: [
 {element: document.getElementsByTagName('TABLE')[1],intro: "some words",position:'left'}
,{element: document.getElementsByTagName('TABLE')[3],intro: "comments again",position:'right'}
,{element: document.getElementsByTagName('TABLE')[0].getElementsByTagName('td')[0],intro: "my logo"}
]
});
intro.setOption('scrollToElement', 'true');
intro.start();

... But the scroll works perfect with data-step and data-intro attributes on tables.

moose-byte commented 8 years ago

I am having this same problem. The interesting thing is that Chrome scrolls to the element automatically, regardless if I set the option or not. Firefox and Safari do not scroll at all.

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.