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

I just ran into this. I have a navigational carousel at the top of the page that centers the clicked item and loads a new page. On back/forward button press, I center the previously selected item using { inline:"center" }. If the destination page was previously scrolled, the page will unexpectedly jump to the top and conflict with scroll restoration, which is disorienting. 

It wouldn't be as flexible as other solutions here, but I found myself just wanting { inline: "center", block: "none" } to prevent scrolling in one direction but allow it in the other. 

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


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

Received on Monday, 23 September 2024 05:11:32 UTC