Bug 162499 - Provide a way to set the same scroll inertia for "-webkit-overflow-scrolling: touch"
Summary: Provide a way to set the same scroll inertia for "-webkit-overflow-scrolling:...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 10
Hardware: iPhone / iPad iOS 10
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-09-23 11:01 PDT by Dima Voytenko
Modified: 2017-04-25 09:45 PDT (History)
6 users (show)

See Also:


Attachments
Testcase: Scroll inertia of the viewport (348 bytes, text/html)
2017-04-24 08:57 PDT, Frédéric Wang (:fredw)
no flags Details
Testcase: Scroll inertia of an element (542 bytes, text/html)
2017-04-24 08:57 PDT, Frédéric Wang (:fredw)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dima Voytenko 2016-09-23 11:01:07 PDT
To make an element scrollable in CSS, currently the following has to be done:

```
.scrollable {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
```

The WebKit-only `-webkit-overflow-scrolling: touch` adds momentum scrolling. However, the scroll inertia is drastically different from the native scroll on `<html>` element. Since it's a WebKit-specific issue, could you please add another CSS property to use the native-like inertia for bigger scrollable elements?
Comment 1 Radar WebKit Bug Importer 2016-10-25 11:01:30 PDT
<rdar://problem/28940255>
Comment 2 Simon Fraser (smfr) 2017-04-17 20:34:49 PDT
Resolved via https://trac.webkit.org/changeset/211197/webkit, which makes WKWebView have the same scroll deceleration as -webkit-overflow-scrolling: touch
Comment 3 Frédéric Wang (:fredw) 2017-04-24 08:57:11 PDT
Created attachment 307979 [details]
Testcase: Scroll inertia of the viewport
Comment 4 Frédéric Wang (:fredw) 2017-04-24 08:57:38 PDT
Created attachment 307980 [details]
Testcase: Scroll inertia of an element
Comment 5 Dima Voytenko 2017-04-25 09:45:29 PDT
Thanks a lot for fixing this! One thing I wanted to confirm. From the fix description it sounds like the scroll inertia in the WKWebView will now be the same as for an element with `-webkit-overflow-scrolling: touch`, right? Does this mean that Safari will eventually have the same scroll inertia as well?