Closed
Bug 1290152
Opened 10 years ago
Closed 9 years ago
Add "nearest" support for scrollIntoView on elements
Categories
(Core :: DOM: Core & HTML, defect, P3)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
DUPLICATE
of bug 1389274
| Tracking | Status | |
|---|---|---|
| firefox50 | --- | affected |
People
(Reporter: bzbarsky, Unassigned)
References
Details
https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview has this IDL:
void scrollIntoView();
void scrollIntoView((boolean or object) arg
);
and converts the object to a ScrollIntoViewOptions dictionary. This allows more control over scrolling behavior.
Kip, you did similar stuff for scrolling on Window, iirc. Are you interested in taking this?
Flags: needinfo?(kgilbert)
Comment 1•10 years ago
|
||
We already support the object form, but it looks like the spec linked above has some additional options we don't support:
enum ScrollLogicalPosition { "start", "center", "end", "nearest" };
- we support only start and end
dictionary ScrollIntoViewOptions : ScrollOptions {
ScrollLogicalPosition block = "center";
ScrollLogicalPosition inline = "center";
};
- we support only block
| Reporter | ||
Comment 2•10 years ago
|
||
> We already support the object form
Oh, so we do. I managed to look at the .idl instead of the .webidl.
Anyway, "nearest" is what would be nice here.
| Reporter | ||
Updated•10 years ago
|
Summary: Add ScrollIntoViewOptions support for scrollIntoView on elements → Add "nearest" support for scrollIntoView on elements
Comment 3•10 years ago
|
||
(In reply to Boris Zbarsky [:bz] from comment #0)
> https://drafts.csswg.org/cssom-view/#dom-element-scrollintoview has this IDL:
>
> void scrollIntoView();
> void scrollIntoView((boolean or object) arg
> );
>
> and converts the object to a ScrollIntoViewOptions dictionary. This allows
> more control over scrolling behavior.
>
> Kip, you did similar stuff for scrolling on Window, iirc. Are you
> interested in taking this?
I don't have many cycles outside of the WebVR work currently, but could certainly give support to anyone that is taking this one.
Flags: needinfo?(kgilbert)
Comment 4•10 years ago
|
||
I am inferring this is a nice but not urgent complement so set P3 for now. Please feel free to modify it if you have a different opinion.
Priority: -- → P3
Comment 5•9 years ago
|
||
Having "center" available would be nice; to be able to get the relevant content front and center easily would be helpful in several cases.
Comment 6•9 years ago
|
||
To summarize, there are a few things missing here:
- block: 'nearest'
- block: 'center'
- inline option with all of its possible values
Should these be separate bugs, or does this bug cover them all?
Chrome now supports all of these fully, as far as I can tell, as of Chrome 61.
Comment 7•9 years ago
|
||
scrollIntoView support now matches the draft spec, now that bug 1389274 landed. Marking this as a duplicate.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
| Assignee | ||
Updated•7 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•