Bug 208110 - scroll-margin not working with scrollIntoView()
Summary: scroll-margin not working with scrollIntoView()
Status: RESOLVED DUPLICATE of bug 189265
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: Safari 13
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-02-23 12:58 PST by collimarco91
Modified: 2020-04-30 11:38 PDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description collimarco91 2020-02-23 12:58:24 PST
scroll-margin does not work with scrollIntoView().

For example:
1. Visit this page: https://buonmenu.com/example
2. Click "Menù all you can eat"
3. Click "Primi piatti" or anything else in the bottom navigation
4. scroll-margin is ignored, while Chrome and other browsers behave properly

I have also tried to add scroll-snap-margin to the element using the inspector, but it is still ignored.
Comment 1 Radar WebKit Bug Importer 2020-02-23 14:17:22 PST
<rdar://problem/59709786>
Comment 2 Simon Fraser (smfr) 2020-02-24 15:56:54 PST
This is a fairly recent CSS change that isn't implemented yet.
Comment 3 collimarco91 2020-02-25 01:09:57 PST
> his is a fairly recent CSS change

Ok, that is true for the name of the property.

However there is *also* a second bug: scroll-snap-margin (or scroll-margin in the future) does not work with scrollIntoView()... it is completely ignored.
Comment 4 Simon Fraser (smfr) 2020-04-30 11:38:20 PDT

*** This bug has been marked as a duplicate of bug 189265 ***