[UIWebView] On-screen keyboard doesn't hide after input gets removed from DOM (Regression)

Originator:radexpl
Number:rdar://27822138 Date Originated:12-Aug-2016 02:01 PM
Status:Open Resolved:
Product:iOS SDK Product Version:10.0 beta 5
Classification:UI/Usability Reproducible:Always
 
Summary:

When the currently-focused <textarea> (presumably any input) gets removed from DOM, the on-screen keyboard doesn’t get hidden. This is a regression since iOS 9.3.

Steps to Reproduce:
Open and run the attached test case project in Xcode. Or:
1. Make a page that contains a <textarea>, and something that causes it to get quickly removed from DOM
2. Open in UIWebView
3. Tap on the textarea (keyboard gets opened)
4. Do the action that causes it to be removed

Expected Results:
Keyboard automatically hides

Actual Results:
Keyboard stays on screen, and keeps dispatching keypress events to `document`.

Regression:
This doesn’t reproduce on iOS 9.3 and earlier (also try running test case project in Xcode 7)

Notes:
Somewhat related: rdar://27764172

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!