You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Blair Vanderhoof (JIRA)" <ji...@apache.org> on 2013/12/02 07:18:35 UTC

[jira] [Resolved] (CB-5521) window.open _system does not work on Windows Phone 8 for bingmaps: url

     [ https://issues.apache.org/jira/browse/CB-5521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Blair Vanderhoof resolved CB-5521.
----------------------------------

    Resolution: Fixed

Not sure if this is fixable, but a workaround I found is to detect non http links and open as _self not _system.

{code}
          $(document).on('click', 'a[target="_blank"]', function(e) {
            var url = $(this).attr('href');
            e.preventDefault();
            // fix for non http urls not opening (maps:) for example
            window.open(url, url.indexOf('http') === 0 ? '_system' : '_self', 'location=yes');
          });
{code}

> window.open _system does not work on Windows Phone 8 for bingmaps: url
> ----------------------------------------------------------------------
>
>                 Key: CB-5521
>                 URL: https://issues.apache.org/jira/browse/CB-5521
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Windows 8
>    Affects Versions: 3.2.0
>         Environment: Windows Phone 8 Emulator
>            Reporter: Blair Vanderhoof
>            Assignee: Jesse MacFadyen
>
> Using this code to capture click events and open in the system browser:
> {code}
>           $(document).on('click', 'a[target="_blank"]', function(e) {
>             e.preventDefault();
>             window.open($(this).attr('href'), '_system', 'location=yes');
>           });
> {code}
> In windows phone 8, if the url follows a bingmaps: convention (http://msdn.microsoft.com/en-us/library/windows/apps/jj635237.aspx) It will not open.



--
This message was sent by Atlassian JIRA
(v6.1#6144)