Texts in html page become not selectable after focusing of html <input> in iOS 12 (works in iOS11)

Originator:smalwatte
Number:rdar://45219430 Date Originated:12-Oct-2018
Status:Open Resolved:
Product:Safari, WKWebview Product Version:iOS 12
Classification:bug Reproducible:Yes
 
Area:
Safari

Summary:
We use this css to enable users to select texts from the html page.
.selectable {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}
Text select works after opening the html page. But text selection stops working after focusing an html <input>.
This happens in Safari and WKWebview (our app is a Cordova hybrid mobile app).

Steps to Reproduce:
Open safari and open a web page with a text input (html <input>) (e.g. google)
select some text by long tapping
focus the search text input and type something (Do not reload the page)
dismiss the keypad
try selecting the text again

Expected Results:
Text should be selectable

Actual Results:
Text is not selectable after focusing of html <input>

Version/Build:
WKWebview
Safari (iOS 12.0)

Configuration:

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!