WKWebView's text action menu incorrectly positioned inside UIScrollView

Originator:n.morev
Number:rdar://32810395 Date Originated:June 16 2017, 11:24 AM
Status:Open Resolved:
Product:iOS Product Version:11 beta 1
Classification:UI/Usability Reproducible:Always
 
Area:
WebKit

Summary:
When using WKWebView inside another UIScrollView the text action menu (UIMenuController with Copy/Look Up/Share... actions  which appears on long tap) does not position itself correctly after user scrolls the outer UIScrollView. To reproduce the bug you have to start scrolling from the point inside WKWebView, otherwise the menu will simply disappear instead of repositioning.

See the attached video and screenshot.

Steps to Reproduce:
Run the attached project. It has 3 views inside UIScrollView: 1. UIWebView, 2. UITextView, 3. WKWebView. The bug reproduces only with WKWebView. Scroll down to the last view, select text with long tap, actions menu will appear, start scrolling up or down  from any point inside the view, end scrolling lifting finger so that scrolling deceleration occurs.

Expected Results:
The text actions menu will appear at the correct positon above the selected text.

Observed Results:
The text actions menu stays where it was before scrolling.

Version:
iOS 11 beta 1
iPhone 7S Simulator
Xcode Version 9.0 beta (9M136h)

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!