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

Anant Sajnani commented on CB-5733:
-----------------------------------

Actually, I am trying to close the child window if the child url has the word 
close at some point in it and have included the code below. It works on android 
and not iOS7. Any ideas why? 

Code-

        function windowOpen(urlLink) {
            url = urlLink;
            reopenWindow = 'true';

            ref = window.open(encodeURI(url), '_blank');
            ref.addEventListener('loadstop', LoadStop);
            ref.addEventListener('exit', Close);



        }




        function LoadStop(event) {



            if (event.url.match("close")) {


                ref.close();
                reloadPage = true
                localStorage.setItem("openWindow", url);

            }




        }

        function Close(event) {

            ref.removeEventListener('loadstop', LoadStop);
            ref.removeEventListener('exit', Close);
            
                 if (reloadPage == true) {
                
                reloadPage = false;
                Appery.navigateTo('StartScreen', {
                    allowSamePageTransition: true,
                    transition: 'slideup',
                    reloadPage: true
                });

            }

        }

> Cannot close child window in iOS7
> ---------------------------------
>
>                 Key: CB-5733
>                 URL: https://issues.apache.org/jira/browse/CB-5733
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: iOS, Plugin InAppBrowser
>         Environment: iPhone 4s iOS 7
>            Reporter: Anant Sajnani
>            Assignee: Andrew Grieve
>
> I can't close child window in iOS7. Works on android
> refTest= window.open("http://www.cnn.com","_blank";);
> refTest.close();



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to