Bug 172875

Summary: [iOS] -webkit-overflow-scrolling: touch causes content to disappear
Product: WebKit Reporter: andrew.holloway
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ajh, bfulgham, fred.wang, rbuis, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: Safari 10   
Hardware: All   
OS: iOS 10   
URL: https://jsfiddle.net/booc0mtaco/kyekqjrL/
Attachments:
Description Flags
Slightly reduced test case none

Description andrew.holloway 2017-06-02 15:06:32 PDT
I've created a minimal example to demonstrate this issue, located here: 

https://jsfiddle.net/booc0mtaco/kyekqjrL/

STEPS to reproduce:

1) open the linked JSFiddle and view the content in MobileSafari
2) click on the header "click to reveal"
3) note that content is visible
4) attempt to scroll to the right

**Expected behavior: the content will scroll smoothly, making use of the prefixed tag for smooth scrolling.

**Actual behavior: the container will vanish.

They are still in the DOM , and in the right locations. Closing and reopening the section also restores them to visible until the next scroll is made.

Removing the prefixed property `-webkit-overflow-scrolling` fixes the behavior, but makes the scroll work as it used to and becomes sticky. Also, removing some of the other properties will fix the symptoms intermittently.

In most cases, triggering any DOM change or style change adjacent to the vanished element will trigger a repaint, and the content will become visible.
Comment 1 Radar WebKit Bug Importer 2017-06-02 15:24:53 PDT
<rdar://problem/32546124>
Comment 2 Simon Fraser (smfr) 2017-06-02 19:47:16 PDT
Created attachment 311898 [details]
Slightly reduced test case
Comment 3 Simon Fraser (smfr) 2017-06-02 19:47:42 PDT
This is gnarly. Seems to involve opacity transitions, nested scrollers, and dynamic hide/show.
Comment 4 andrew.holloway 2017-06-05 10:33:30 PDT
Thanks for cleaning that up. As you probably saw, removing any one of those will cause the proper repainting. 

One note for reference. In one iteration of testing, I noticed that setting the end-transition opacity to .99 or lower seemed to fix it. Not sure if stacking context might also be involved.
Comment 5 Andrew H 2019-09-27 00:07:24 PDT
Combing thru my open OSS bugs and it appears this might be fixed in the latest webkit on iOS (13.1)
Comment 6 Simon Fraser (smfr) 2019-09-28 04:02:41 PDT
Thanks for checking!