Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 096E1200B48 for ; Sun, 3 Jul 2016 17:24:13 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0657D160A6B; Sun, 3 Jul 2016 15:24:13 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 4FA2C160A71 for ; Sun, 3 Jul 2016 17:24:12 +0200 (CEST) Received: (qmail 2481 invoked by uid 500); 3 Jul 2016 15:24:11 -0000 Mailing-List: contact issues-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@cordova.apache.org Received: (qmail 2453 invoked by uid 99); 3 Jul 2016 15:24:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jul 2016 15:24:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 033162C02A9 for ; Sun, 3 Jul 2016 15:24:11 +0000 (UTC) Date: Sun, 3 Jul 2016 15:24:11 +0000 (UTC) From: "Alan Adesalu (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CB-10376) autofocus doesn't work with WKWebView engine plugin MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sun, 03 Jul 2016 15:24:13 -0000 [ https://issues.apache.org/jira/browse/CB-10376?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15360569#comment-15360569 ] Alan Adesalu commented on CB-10376: ----------------------------------- I have managed to fix this by implementing a variation of the same fix for the Telerik WKWebView. Open CDVWKWebViewEngine.m and at the end of the updateSettings method (around line 140), add the following: BOOL keyboardDisplay = !([settings cordovaBoolSettingForKey:@"KeyboardDisplayDoesNotRequireUserAction" defaultValue:NO]); if (!keyboardDisplay) { SEL sel = sel_getUid("_startAssistingNode:userIsInteracting:blurPreviousNode:userObject:"); Class WKContentView = NSClassFromString(@"WKContentView"); Method method = class_getInstanceMethod(WKContentView, sel); IMP originalImp = method_getImplementation(method); IMP imp = imp_implementationWithBlock(^void(id me, void* arg0, BOOL arg1, BOOL arg2, id arg3) { ((void (*)(id, SEL, void*, BOOL, BOOL, id))originalImp)(me, sel, arg0, TRUE, arg2, arg3); }); method_setImplementation(method, imp); } This will make the keyboard pop up again if you programatically focus on a input or textarea with KeyboardDisplayRequiresUserAction set to false. As this is something which is preventing a large amount of people from considering this plugin, is this something we could have included in the next release? > autofocus doesn't work with WKWebView engine plugin > --------------------------------------------------- > > Key: CB-10376 > URL: https://issues.apache.org/jira/browse/CB-10376 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin WKWebViewEngine > Affects Versions: 5.4.1 > Environment: Tested on iPhone 6 plus and iPhone 5S both running iOS 9.2 > Reporter: David Douglas > Priority: Minor > Labels: iOS, triaged > > When using WKWebView engine the iOS Soft Keyboard fails to automatically open when the 'autofocus' attribute is set. > How to recreate: > 1. Add platform and keyboard plugin > ``` > cordova platform add ios@4.0.1 > cordova plugin add cordova-plugin-keyboard@1.1.3 --save > ``` > 2. Update iOS keyboard to enable focus commands in 'config.xml': > ``` > > ``` > 3. Add textarea to test with autofocus attribute. > ``` > > ``` > (Note: Before adding the WKWebView engine plugin the UIWebView will automatically open the Soft Keyboard.) > 4. Add the WKWebView engine plugin > ``` > cordova plugin add cordova-plugin-wkwebview-engine@1.0.1 --save > ``` > What happens: > Nothing. > What should happen: > The soft keyboard should open automatically (the same a UIWebView) -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org For additional commands, e-mail: issues-help@cordova.apache.org