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 7B859200BB9 for ; Mon, 7 Nov 2016 09:33:01 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 7A578160AEB; Mon, 7 Nov 2016 08:33:01 +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 C8699160B10 for ; Mon, 7 Nov 2016 09:33:00 +0100 (CET) Received: (qmail 97178 invoked by uid 500); 7 Nov 2016 08:33:00 -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 96807 invoked by uid 99); 7 Nov 2016 08:32:59 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 07 Nov 2016 08:32:59 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8CB222C2A67 for ; Mon, 7 Nov 2016 08:32:59 +0000 (UTC) Date: Mon, 7 Nov 2016 08:32:59 +0000 (UTC) From: "Sergey Shakhnazarov (JIRA)" To: issues@cordova.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Resolved] (CB-11422) ios SplashScreen plugin may make webview disabled by not calling destroyView method MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 07 Nov 2016 08:33:01 -0000 [ https://issues.apache.org/jira/browse/CB-11422?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sergey Shakhnazarov resolved CB-11422. -------------------------------------- Resolution: Cannot Reproduce Please reopen if this is still actual. > ios SplashScreen plugin may make webview disabled by not calling destroyView method > ----------------------------------------------------------------------------------- > > Key: CB-11422 > URL: https://issues.apache.org/jira/browse/CB-11422 > Project: Apache Cordova > Issue Type: Bug > Components: Plugin SplashScreen > Affects Versions: 3.5.0 > Environment: ios > Reporter: Jonathan Li > > When using ios splash screen, it is noticed sometimes, after the splash screen is dimissed, the ios main uiwebview is disabled. So even if the content in the webview shows properly, but user cannot click on any items on the screen. > The project adds the splash screen plugin, and use all default settings. > The debug shows, when the page loaded is finished, it calls pageDidLoad method, which calls setVisible to NO. Inside the setVisible method, in the dispatch_after block, the completion block will only call destroyViews method if the screen transition is finished at below code block > dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (uint64_t) effectiveSplashDuration * NSEC_PER_SEC), dispatch_get_main_queue(), CFBridgingRelease(CFBridgingRetain(^(void) { > NSLog(@"splash screen: block %@", NSStringFromSelector(_cmd)); > [UIView transitionWithView:self.viewController.view > duration:(fadeDuration / 1000) > options:UIViewAnimationOptionTransitionNone > animations:^(void) { > [weakSelf hideViews]; > } > completion:^(BOOL finished) { > NSLog(@"splash screen: %@ finished %d", NSStringFromSelector(_cmd), finished); > if (finished) { > [weakSelf destroyViews]; > // TODO: It might also be nice to have a js event happen here -jm > } > } > ]; > }))); > } > } > The problem is if the webview is busy to handle other events (in the testing project, there are several update on frame and bounds, so it calls updateImage few times), then the transition will not be finished when completion block is called. As a result, the destroyView will not be called and the userInteractionEnabled is not set to true after the splash screen is dismissed. > One possible solution is removing the observer and also enable user interaction within setVisible method, as there is no point to continue observer the frame and bound change when splash screen starts to fade out. And it can also be sure the user interaction is always enabled again after dismissing the splash screen. -- 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