1

I would like to smoothly scroll inactive Chrome tab to bottom, but it only gets scrolled when I activate the tab. Is there a way to proceed with scrolling without activating the tab? Here is a code to test via console:

window.setTimeout(function() {
  window.scrollBy({
    top: 9999999,
    behavior: 'smooth'
  });
}, 3000);

Insert it into console, switch to another tab, wait 3 seconds and then go back. Tab will be only scrolled after you activate it again.

1 Answers1

0

The problem is not the scroll but the setTimeout that does not work the same if the tab is not active.

Nassim Aouragh
  • 333
  • 3
  • 7