[Webkit-unassigned] [Bug 142757] New: calling element.focus() from -[WKWebView evaluateJavaScript:completionHandler:] does not show keyboard

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 16 17:22:48 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=142757

            Bug ID: 142757
           Summary: calling element.focus() from -[WKWebView
                    evaluateJavaScript:completionHandler:] does not show
                    keyboard
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (Nightly build)
          Hardware: iOS
                OS: iOS 8.2
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit API
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jberkman at weebly.com

See the fix in https://bugs.webkit.org/show_bug.cgi?id=132974

Our app embeds an html page, and has an interface similar to Keynote, in that tapping on an element presents a wireframe, and double-tapping begins editing. We handle the double-tap gesture my making a call to -[WKWebView evaluateJavaScript:completionHandler:], which ends up calling element.focus() on the appropriate node.

I suspect that setting m_userIsInteracting = true in WebPage::runJavaScriptInMainFrame() would work around this in some cases, but I'm guessing that wouldn't work if we ended up calling .focus() in a timeout handler.

Are there any other mechanisms that could be done to allow element focusing from JS? Maybe require interaction only while the page is loading or something? We've been looking forward to moving to WKWebView since last June but this behaviour has prevented us from making the switch.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150317/1f570bdf/attachment-0002.html>


More information about the webkit-unassigned mailing list