Bug 203688

Summary: [iOS] Text selection escapes overflow clip
Product: WebKit Reporter: Ali Juma <ajuma>
Component: Layout and RenderingAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bfulgham, megan_gardner, rniwa, simon.fraser, wenson_hsieh, zalan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.chromium.org/p/chromium/issues/detail?id=626971
Attachments:
Description Flags
Screenshot none

Description Ali Juma 2019-10-31 11:26:04 PDT
Created attachment 382482 [details]
Screenshot

When text is selected inside an overflow:scroll element, and then that scroller is scrolled so that the selected text is no longer visible, the selection highlight is still drawn, outside the clip.

For example:
1. Visit https://jsfiddle.net/s82hfLkn/1/show.
2. Select "Hello" and then scroll the pink scrolling div.
3. Wait until the div has stopped moving.

At this point, the selection highlight will be drawn above the div, even though the selected text is now clipped out. See the attached screenshot.