New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 699843 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 674593


Show other hotlists

Hotlists containing this issue:
Non-Standard-IDL


Sign in to add a comment

Standardize or remove Element#scrollIntoViewIfNeeded()

Project Member Reported by foolip@chromium.org, Mar 9 2017

Issue description

Chromium and WebKit have a Element#scrollIntoViewIfNeeded() method. EdgeHTML and Gecko do not.

If standardized, it would be here:
https://drafts.csswg.org/cssom-view/#extension-to-the-element-interface

Simon, I can't find any previous standards discussion, do you know of any?
 
Blocking: 674593
Cc: foolip@chromium.org
Labels: -Pri-3 Pri-2
Status: Available (was: Untriaged)
Labels: Update-Quarterly

Comment 5 by zcorpan@gmail.com, Mar 13 2017

Labels: -Pri-2 Pri-3
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17152

The current standard version of scrollIntoViewIfNeeded is:

elm.scrollIntoView({inline: "nearest", block: "nearest"});

Comment 6 by zcorpan@gmail.com, Mar 13 2017

Labels: -Pri-3 Pri-2

Comment 7 by foolip@chromium.org, Mar 20 2017

Cc: dtapu...@chromium.org
Sounds like this should possibly be blocked on implementing element.scrollIntoView per spec:
https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview

dtapuska@, I can't find an open issue for that, do you think it would make sense to first to that and then try to remove scrollIntoViewIfNeeded()? The other path would be to first implement that and then define scrollIntoViewIfNeeded() in terms of it in the spec as well.
Cc: bokan@chromium.org
Components: -Blink>CSS Blink>Scroll
Labels: Hotlist-Input-Dev
Owner: sunyunjia@chromium.org
Status: Assigned (was: Available)
Usage shows 
ElementScrollIntoViewIfNeeded is 0.0055%

I expect that it is OK to remove this with such low usage.

Sandra can you work at trying to figure out what the usage of it is on httparchive?

Moving to be a Scroll issue and not a CSS issue.

Comment 9 by foolip@chromium.org, Mar 21 2017

Is it currently possible to accurately reimplement scrollIntoViewIfNeeded() using other APIs? If so then we could probably offer that as a polyfill and attempt the removal without blocking on anything.

Comment 10 by sim...@opera.com, Sep 12 2017

Re my comment 5, that was not quite correct since it's not possible to not scroll if in view, and scroll to center if not in view. https://github.com/w3c/csswg-drafts/pull/1805 is a proposal to add that ability.

Comment 11 by sim...@opera.com, Sep 14 2017

Cc: -sim...@opera.com zcorpan@gmail.com
Labels: Hotlist-Interop

Sign in to add a comment