Re: [csswg-drafts] [cssom-view-1] Provide option for scrollIntoView that only scrolls a single scroll container. (#9452)

   You can also do this to reset the window to the position it was before, once the item is scrolled into view.
   
    const y = window.scrollY;
    const x = window.scrollX;
    if (isFocused && item.current) {
      item.current.scrollIntoView({ block: 'center' });
    }
    window.scroll(x, y);
    

-- 
GitHub Notification of comment by thunderfreak
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9452#issuecomment-2041055985 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 6 April 2024 11:37:35 UTC