You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Stanislav Iegorov (JIRA)" <ji...@apache.org> on 2016/03/25 22:01:25 UTC

[jira] [Comment Edited] (CB-10154) alert() - callback is not fired on a real device (iOS 8.4.1)

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

Stanislav Iegorov edited comment on CB-10154 at 3/25/16 9:00 PM:
-----------------------------------------------------------------

Sure!

Here is a method from my last attempt. Don't mind the navigator.notification.confirm - same happens to .alert.

function DisplayFlushRecentItemsConfirmationDialog() {
    navigator.notification.confirm(
    'You are about to clear recent history. Proceed?', 
     FlushRecentItems,
    'Clear recent',
    ['Proceed', 'Cancel']);
}

function FlushRecentItems(buttonIndex) {
    //User's pressed Proceed.
    if (buttonIndex == "1") {
        $('#recentItemsList').empty();
    }
}

DisplayFlushRecentItemsConfirmationDialog method isn't affected by normal app lifecycle - only user invokes it manually.

Behaviour is really strange - when I launch an app (fresh launch) and call DisplayFlushRecentItemsConfirmationDialog, confirm window appears as it should, but after several minutes of usage I try to invoke the method again and nothing happens.

To my mind it looks like something gets broken in plugin call chain. Probably somewhere in JS code -> cordova.exec -> native iOS plugin code chain.

Also, it might be something with plugin implementation for iOS 8 - I saw some IFDEFs in CDVNotification.

Thanks.

P.S.

On Android of all version everything works perfectly fine.


was (Author: borninmusic):
Sure!

Here is a method from my last attempt. Don't mind the navigator.notification.confirm - same happens to .alert.

function DisplayFlushRecentItemsConfirmationDialog() {
    navigator.notification.confirm(
    'You are about to clear recent history. Proceed?', 
     FlushRecentItems,
    'Clear recent',
    ['Proceed', 'Cancel']);
}

function FlushRecentItems(buttonIndex) {
    //User's pressed Proceed.
    if (buttonIndex == "1") {
        $('#recentItemsList').empty();
    }
}

DisplayFlushRecentItemsConfirmationDialog method isn't affected by normal app lifecycle - only user invokes it manually.

Behaviour is really strange - when I launch an app (fresh launch) and call DisplayFlushRecentItemsConfirmationDialog, confirm window appears as it should, but after several minutes of usage I try to invoke the method again and nothing happens.

To my mind it looks like something gets broken in plugin call chain. Probably somewhere in JS code -> cordova.exec -> native iOS plugin code chain.

Also, it might be something with plugin implementation for iOS 8 - I saw some IFDEFs in CDVNotification.

Thanks.

> alert() - callback is not fired on a real device (iOS 8.4.1)
> ------------------------------------------------------------
>
>                 Key: CB-10154
>                 URL: https://issues.apache.org/jira/browse/CB-10154
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Dialogs
>    Affects Versions: 1.2.0, 1.2.1-dev
>         Environment: Cordova CLI 5.3.3, cordova ios v. 3.9.2, device: iPhone 4S, iOS 8.4.1
>            Reporter: Stanislav Iegorov
>            Assignee: jcesarmobile
>   Original Estimate: 240h
>  Remaining Estimate: 240h
>
> When called from JS code alert() gets invoked, but no alert windows is displayed. The same situation is with a callback passed into alert() - nothing gets invoked.



--
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