Fix web app contenteditable focus

This commit is contained in:
Ilya Laktyushin
2022-05-26 15:02:20 +04:00
parent f2d7c9ab9b
commit ace926f2c8

View File

@@ -55,7 +55,7 @@ final class WebAppWebView: WKWebView {
handleScriptMessageImpl?(message)
}, name: "performAction")
let selectionString = "var css = '*{-webkit-touch-callout:none;} :not(input):not(textarea){-webkit-user-select:none;}';"
let selectionString = "var css = '*{-webkit-touch-callout:none;} :not(input):not(textarea):not([\"contenteditable\"=\"true\"]){-webkit-user-select:none;}';"
+ " var head = document.head || document.getElementsByTagName('head')[0];"
+ " var style = document.createElement('style'); style.type = 'text/css';" +
" style.appendChild(document.createTextNode(css)); head.appendChild(style);"