Bug 199915 - Sticky element inside another sticky element does not redraw properly on scroll
Summary: Sticky element inside another sticky element does not redraw properly on scroll
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Scrolling (show other bugs)
Version: Safari 11
Hardware: Macintosh macOS 10.13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-07-18 13:44 PDT by max
Modified: 2019-07-22 11:54 PDT (History)
3 users (show)

See Also:


Attachments
screen recording (1.67 MB, video/quicktime)
2019-07-18 13:44 PDT, max
no flags Details
screen recording (safari tech preview) (1.85 MB, video/quicktime)
2019-07-22 03:43 PDT, max
no flags Details
Testcase (447 bytes, text/html)
2019-07-22 11:54 PDT, Simon Fraser (smfr)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description max 2019-07-18 13:44:22 PDT
Created attachment 374410 [details]
screen recording

Looks like webkit calculates layout, but do not repaint sticky element on scroll.

HTML to reproduce:
```
<html>
<head>
    <meta charset="utf8" />
    <style>
        .sticky {
            position: -webkit-sticky;
            position: sticky;
            top: 0;
        }
        .parent {
            background: gray;
            height: 150vh;
        }
        .child {
            background: white;
        }
    </style>
</head>
<body>
    <div class="sticky parent">
        <div class="sticky child"><a href="#">sticky</a></div>
    </div>
</body>
</html>
```
Comment 1 max 2019-07-19 01:45:12 PDT
By the way, this case works right in iframe. You can check it out on jsfiddle:
https://jsfiddle.net/gthjnvbk/
Comment 2 Radar WebKit Bug Importer 2019-07-21 16:37:54 PDT
<rdar://problem/53375284>
Comment 3 Simon Fraser (smfr) 2019-07-21 20:39:56 PDT
Does this reproduce in Safari Tech Preview?
Comment 4 max 2019-07-22 03:43:11 PDT
Created attachment 374593 [details]
screen recording (safari tech preview)
Comment 5 max 2019-07-22 03:44:41 PDT
(In reply to max from comment #4)
> Created attachment 374593 [details]
> screen recording (safari tech preview)

(In reply to Simon Fraser (smfr) from comment #3)
> Does this reproduce in Safari Tech Preview?

Yes, i have added screen recording. Looks the same.
Comment 6 Simon Fraser (smfr) 2019-07-22 11:54:23 PDT
Created attachment 374618 [details]
Testcase