New issue
Advanced search Search tips

Issue 918357 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

scrollIntoView is not working inside shadow dom

Reported by mi...@ubo.ro, Dec 31

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36

Steps to reproduce the problem:
Use scrollIntoView to navigate to an item inside shadow dom.

let shadow = this.attachShadow({mode: 'open'});
 shadow.innerHTML = this.querySelector('template').innerHTML;
 let item = shadow.querySelector('#someID');
  scroll item.scrollIntoView({behavior: "smooth", block: "center"});

What is the expected behavior?
The browser should scroll to the element just like it would do if it were to be outside of shadow dom.

What went wrong?
nothing happens. The browser doesn't scroll to the item.

Did this work before? No 

Does this work in other browsers? No

Chrome version: 71.0.3578.98  Channel: stable
OS Version: OS X 10.14.1
Flash Version: 

This makes shadow dom and scrollIntoView mutually exclusive which is bad for both features.
 
Labels: Needs-Triage-M71
Cc: santhoshkumar@chromium.org
Labels: Needs-Feedback Triaged-ET
"Thanks for filing the issue!

@Reporter: Could you please share a sample test file/URL  which helps us to triage this further in a better way."

Sign in to add a comment