Skip to content

[cssom-view] scrollIntoView and shadow DOM #1527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
zcorpan opened this issue Jun 13, 2017 · 4 comments
Open

[cssom-view] scrollIntoView and shadow DOM #1527

zcorpan opened this issue Jun 13, 2017 · 4 comments

Comments

@zcorpan
Copy link
Member

zcorpan commented Jun 13, 2017

https://drafts.csswg.org/cssom-view/#element-scrolling-members

To scroll an element into view element, with a ScrollIntoViewOptions dictionary options, means to run these steps for each ancestor element or viewport that establishes a scrolling box scrolling box, in order of innermost to outermost scrolling box:​

How should element.scrollIntoView() interact with shadow DOM? cc @hayatoito @rniwa @TakayoshiKochi

@hayatoito
Copy link
Member

Should we change ancestor with shadow-including-ancestor, as we did a similar thing for fullscreen api whatwg/fullscreen@611a404 ? I am not sure what is needed here. Someone who is familiar with scrollIntoView should think about which is needed.

@mihaiav
Copy link

mihaiav commented Dec 31, 2018

It seems scrollIntoView is not working inside shadow dom(be it closed or open) which makes scrollIntoView and shadow dom are mutually exclusive. Is there any chance for this to be fixed anytime soon? I'm working on a project and the lack of support for scrollIntoView into shadow dom makes the UX quite bad.

@hayatoito
Copy link
Member

@mihaiav

Do you know other browser's behavior about this? I think we all should fix this.
Blink's tracking bug: https://bugs.chromium.org/p/chromium/issues/detail?id=918357

@rniwa
Copy link

rniwa commented Feb 5, 2019

element.scrollIntoView needs to run that step for each composed parent, not just shadow including ancestor because when an element is assigned to a slot, then its slot's scrollable ancestors need to scroll as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants