You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Patrick Mueller (JIRA)" <ji...@apache.org> on 2012/10/18 15:10:04 UTC

[jira] [Commented] (CB-1672) "alert" calls don't stack as they do on other platforms

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

Patrick Mueller commented on CB-1672:
-------------------------------------

define "stack".  What are you seeing and interacting with visually?  Just the "Foobar." alert, or does the UI somehow combine "Foobar." and "Barfoo."?

I think we're venturing into "browser implementation specific detail" here.  alert() is typical synchronous, so I'd really expect to see two separate modal prompters here, one after another.  

And, as alert() is synchronous, and potentially long-running, blocking synchronous calls tend to be a really bad thing to do in general, alert() is just a really, really bad thing to use in your code.  Hopefully you can find a better option - either convert the alert() into an async-friendly HTML/JS thing.  Or if you're just using this for debug purposes - HOPEFULLY - find a debugger for your platform.  I list some options here: http://muellerware.org/papers/pgday-2012-eu/index.html
                
> "alert" calls don't stack as they do on other platforms
> -------------------------------------------------------
>
>                 Key: CB-1672
>                 URL: https://issues.apache.org/jira/browse/CB-1672
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Windows 8
>            Reporter: Matthew Baxter-Reynolds
>            Assignee: Jesse MacFadyen
>
> Run this code on Windows 8 and you only get one MessageDialog instance appear:
> {noformat}
>     <script type="text/javascript">
>         $(document).ready(function() {
>             // wire up...
>             navigator.notification.alert("Foobar.");
>             navigator.notification.alert("Barfoo.");
>         });
>     </script>
> {noformat}
> Run it on iOS and you'll get two message (albeit not tidily).
> We either need to create a queue, or document it as a quirk.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira