You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Diogo Lima (JIRA)" <ji...@apache.org> on 2012/06/21 23:45:42 UTC

[jira] [Created] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Diogo Lima created CB-950:
-----------------------------

             Summary: navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
                 Key: CB-950
                 URL: https://issues.apache.org/jira/browse/CB-950
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
    Affects Versions: 1.8.1
         Environment: Xcode 4.3.3 iOS 5.1 simulator
            Reporter: Diogo Lima
            Assignee: Shazron Abdullah


navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".

I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diogo Lima updated CB-950:
--------------------------

    Comment: was deleted

(was: Not resolved yet.)
    
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>         Attachments: index.html
>
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diogo Lima reopened CB-950:
---------------------------


Not resolved yet.
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398990#comment-13398990 ] 

Shazron Abdullah commented on CB-950:
-------------------------------------

Adding code "at particular moments in the page" won't work, since it will wait for the deviceready event (thus async), and this will occur after the DOM is loaded, so it won't do what you think it will do.

Thus, the whole page will be loaded first, then the deviceready fires.

You can try, but it won't have the desired effect that I think you want:
{code}
document.addEventListener("deviceready", function() {
    navigator.notification.alert("Cordova is working!");
}, false);
{code}
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>         Attachments: index.html
>
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398970#comment-13398970 ] 

Shazron Abdullah commented on CB-950:
-------------------------------------

Right, I looked at your code - you didn't read my two links especially the 2nd link. You can only call the API function after deviceready is fired. You are not doing it in this case - when your script in your script tag is run, deviceready has not fired yet.
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>         Attachments: index.html
>
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398981#comment-13398981 ] 

Diogo Lima commented on CB-950:
-------------------------------

understood, but may you show-me how can i proceed in this case, to fire an alert in particular moments in the page? It would be helpful. Thanks in advance.
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>         Attachments: index.html
>
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398931#comment-13398931 ] 

Diogo Lima commented on CB-950:
-------------------------------

and it still not working after waiting like 2 minutes to fire the alert.
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398935#comment-13398935 ] 

Diogo Lima commented on CB-950:
-------------------------------

one thing i not mentioned is it working on 4.3 simulator...
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diogo Lima updated CB-950:
--------------------------

    Attachment: index.html

This is the code that doesn't work.
I see only the alert "foo".
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>         Attachments: index.html
>
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398966#comment-13398966 ] 

Diogo Lima edited comment on CB-950 at 6/21/12 10:57 PM:
---------------------------------------------------------

This is the code that doesn't work. (attached)
I see only the alert "foo".
                
      was (Author: diogor):
    This is the code that doesn't work.
I see only the alert "foo".
                  
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>         Attachments: index.html
>
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398943#comment-13398943 ] 

Diogo Lima commented on CB-950:
-------------------------------

Like i said, i am using the template included in the project. It already have a onBodyLoad event.
Shazron, i have tested it, not working.
It is working for you in xcode 4.3 iOS 5.1?
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Comment Edited] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398943#comment-13398943 ] 

Diogo Lima edited comment on CB-950 at 6/21/12 10:58 PM:
---------------------------------------------------------

Like i said, i am using the template included in the project. It already have a onBodyLoad event.
Shazron, i have tested it, not working.
Is it working for you in xcode 4.3 iOS 5.1?
                
      was (Author: diogor):
    Like i said, i am using the template included in the project. It already have a onBodyLoad event.
Shazron, i have tested it, not working.
It is working for you in xcode 4.3 iOS 5.1?
                  
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>         Attachments: index.html
>
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398932#comment-13398932 ] 

Shazron Abdullah commented on CB-950:
-------------------------------------

Wait for the deviceready event:
# https://github.com/apache/incubator-cordova-ios/blob/master/Cordova-based%20Application/www/index.html#L60
# http://docs.phonegap.com/en/1.8.1/cordova_events_events.md.html#deviceready 
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diogo Lima closed CB-950.
-------------------------

    Resolution: Not A Problem
    
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>         Attachments: index.html
>
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shazron Abdullah closed CB-950.
-------------------------------

    
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Filip Maj (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Filip Maj resolved CB-950.
--------------------------

    Resolution: Not A Problem

Cordova APIs are not available until the {{deviceready}} event fires. That is why it is not working for you when you move it outside of the deviceready event handler.
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398928#comment-13398928 ] 

Diogo Lima commented on CB-950:
-------------------------------

How do i know when it fires so i can use the apis?
                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Shazron Abdullah (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13398952#comment-13398952 ] 

Shazron Abdullah commented on CB-950:
-------------------------------------

It is resolved because it works after using the deviceready event - and has been tested, and I just tested it again. I don't know why it doesn't work for you, but this is not a problem with the API.

Provide some sample code where it *doesn't* work so we can repro. If deviceready doesn't work, all PhoneGap apps won't work and we will definitely hear about it. This is most likely user error. 


                
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CB-950) navigator.notification.alert not working outside onDeviceReady on 5.1 sdk

Posted by "Diogo Lima (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CB-950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Diogo Lima updated CB-950:
--------------------------

    Comment: was deleted

(was: one thing i not mentioned is it working on 4.3 simulator...)
    
> navigator.notification.alert not working outside onDeviceReady on 5.1 sdk
> -------------------------------------------------------------------------
>
>                 Key: CB-950
>                 URL: https://issues.apache.org/jira/browse/CB-950
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS
>    Affects Versions: 1.8.1
>         Environment: Xcode 4.3.3 iOS 5.1 simulator
>            Reporter: Diogo Lima
>            Assignee: Shazron Abdullah
>              Labels: ios, ios5.1
>         Attachments: index.html
>
>
> navigator.notification.alert working only if is inside onDeviceReady, is not working outside. I notice that is working after a reload using document.location = "index.html".
> I have created a new project, then the message "Cordova is working!" appears as usual, but when moving it to another <script> block, it's not working.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira