[ 
https://issues.apache.org/jira/browse/CB-10784?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15923115#comment-15923115
 ] 

ASF subversion and git services commented on CB-10784:
------------------------------------------------------

Commit 0623f67ac03c7591c2d28168ffbe52c60f17d89b in cordova-plugin-contacts's 
branch refs/heads/master from [~coryjthompson]
[ 
https://git-wip-us.apache.org/repos/asf?p=cordova-plugin-contacts.git;h=0623f67 
]

CB-10784: CDVContactsPicker finish animating before callback

 This closes #107


> Unable to use Cordova Plugins that use a native view directly on pickContacts 
> callback.
> ---------------------------------------------------------------------------------------
>
>                 Key: CB-10784
>                 URL: https://issues.apache.org/jira/browse/CB-10784
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Contacts
>    Affects Versions: Master
>         Environment: iOS
>            Reporter: Cory Thompson
>            Priority: Minor
>              Labels: ios, pendingPR, triaged
>
> 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
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to