Application crashes inside UIWebView when copy button is pressed on keyboard (iphone plus)

Number:rdar://6468254619 Date Originated:8/10/2017
Status:Open Resolved:NO
Product:ios Product Version:10.2.1
Classification:crash Reproducible:100%

Application crashes when user tries to edit content inside UIWebView, after keyboard buttons are pressed from the following list:
crop, copy, make text bold. 

Important note: device is iphone 6s plus in landscape mode (only in landscape such options appear)

I've attached sample which shows the problem.

Steps to Reproduce:
1. Create singleview application
2. Add UIWebView to the auto-generated viewcontroller
3. load into UIWebView the following HTML (say, index.html inside project directory):

        <div contenteditable="true">
        <div contenteditable="true" >
            Select crash to crash GD
using the following command:
NSString * htmlfilePath = [[NSBundle mainBundle] pathForResource:@"index" ofType:@"html"];
  [self.webView loadData:[NSData dataWithContentsOfFile:htmlfilePath] MIMEType:@"text/html" textEncodingName:@"UTF-8" baseURL:[NSURL URLWithString:@"com.test.crash"]];
where webView - is outlet
4. Build & launch application
5. Run, rotate device to landscape, make webView firstResponder
6. select text and press crop icon (first column, first row from top)

Expected Results:
Application should not crash

Observed Results:
Application crashes with:

2017-08-10 12:37:50.192091 CrashSample[3223:1087859] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIThreadSafeNode _responderForEditing]: unrecognized selector sent to instance 0x170202120'

iOS 10.2.1 (14D27)
Model: iPhone 6s Plus


How did you get such a high bug ID number?

By indiekiduk at Oct. 4, 2017, 12:13 a.m. (reply...)

Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at 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!