cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-10784) Unable to use Cordova Plugins that use a native view directly on pickContacts callback.
Date Fri, 04 Mar 2016 00:18:40 GMT


ASF GitHub Bot commented on CB-10784:

GitHub user coryjthompson opened a pull request:

    CB-10784: CDVContactsPicker finish animating before callback

You can merge this pull request into a Git repository by running:

    $ git pull master

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #107
commit a75d1198d01980b37d112ae515223812513b10d6
Author: Cory Thompson <>
Date:   2016-03-03T23:52:28Z

    CDVContactsPicker finish automating before callback


> Unable to use Cordova Plugins that use a native view directly on pickContacts callback.
> ---------------------------------------------------------------------------------------
>                 Key: CB-10784
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts
>    Affects Versions: Master
>         Environment: iOS
>            Reporter: Cory Thompson
>            Priority: Minor
>              Labels: ios
> I attempted to open a native dialog directly after a using pickContacts and receive the
following error on iOS.
> navigator.contacts.pickContact(onContactItemPickedSuccess, onContactItemPickedError);
> function onContactItemPickedSuccess(contact) {
>      navigator.notification.confirm(…);
> }
> Warning: Attempt to present <UIAlertController: 0x14a83600> on <CDVContactsPicker:
0x151e7400> whose view is not in the window hierarchy!
> A workaround is wrap the confirmation code using a JavaScript setTimeout for 1000ms.
> I’ve dug into the Objective C code and what I suspect is happening is that the successCallback
is called before the animation for closing the CDVContactsPicker has finished.
> I’ve tested moving the callback after the close animation and my issue is resolved.
I will include a pull request in the comments.
> The only potential problem I see with this is the original author may have decided to
return before animation close so that a user could update the HTML behind the contactPicker
therefore appearing to load much faster.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message