UIWebView crashes app with -[UIWebView cut:]: unrecognized selector

Originator:respectthecode
Number:rdar://18425974 Date Originated:9/23/14
Status:Open Resolved:
Product:iOS Product Version:7.1.2 and 8.0
Classification: Reproducible:
 
Summary:
In a UIWebView with a text field and a button the app will crash if the text field loses focus and then the user attempts to copy/cut/paste in the text field.

Steps to Reproduce:
1. Load a UIWebView with
    <input type="text" value="value">
    <input type="button">
2. Tap inside of the text field
3. Tap the button
4. Select the text in the text field and tap copy

Expected Results:
The text should be copied and the app should not crash.

Actual Results:
Crash

NSInvalidArgumentException: -[UIWebView cut:]: unrecognized selector sent to instance 0x17816c000
CoreFoundation:0 __exceptionPreprocess
libobjc.A.dylib:0 objc_exception_throw
CoreFoundation:0 __methodDescriptionForSelector
CoreFoundation:0 ___forwarding___
CoreFoundation:0 __forwarding_prep_0___
UIKit:0 -[UICalloutBar buttonPressed:]
Foundation:0 __NSFireDelayedPerform
CoreFoundation:0 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__
CoreFoundation:0 __CFRunLoopDoTimer
CoreFoundation:0 __CFRunLoopRun
CoreFoundation:0 CFRunLoopRunSpecific
GraphicsServices:0 GSEventRunModal
UIKit:0 UIApplicationMain
Client/main.m:16:0 main
libdyld.dylib:0 start


Version:
7.1.2 and 8.0

Notes:


Configuration:
Any iOS device or Simulator

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!