This is a migrated thread and some comments may be shown as answers.

IFrame breaks javascript on iOS7 (Resetting plugins due to page load)

4 Answers 94 Views
Apple iOS
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
MoriartyX64
Top achievements
Rank 1
MoriartyX64 asked on 23 Apr 2014, 11:59 AM
In an effort to find an alternative to another issue, where the [InAppBrowser breaks the layout on orientation change](http://www.telerik.com/forums/inappbrowser-breaks-layout-on-orientation-change), I'm trying to render an iframe on a regular Kendo View.  

This all worked well in previous versions of Cordova/Kendo, but somehow this breaks on a live device (not debugger) on iOS7, Kendo UI Mobile v2013.3.1507 and Cordova 3.2.0.

On an actual device the debugger logs shows the following:

> Resetting plugins due to page load.
> Finished load of: file:///var/mobile/Applications/{LARGE-GUID}/Documents/index.html#test-iframe.html


Next, no more debugging lines appear. And most of the Javascript seems broken afterwards.

In order to render the page, using the `data-show` attribute, I execute the following:

function onPageShow() {
    url = "http://www.youtube.com/embed/OTqO08-vIoE";

    // dynamically append an iframe
            $("#video-container").append('<iframe id="video-player" frameborder="0" allowfullscreen></iframe>');
    
            // and dynamically set its url
            $('#video-player').attr('src', url);
        }


Note that the example uses a YouTube video, but this also occurs when using any given page such as for example www.icenium.com.

Is this a known issue? Or am I doing something wrong here?

4 Answers, 1 is accepted

Sort by
0
MoriartyX64
Top achievements
Rank 1
answered on 24 Apr 2014, 09:22 AM
It seems to be the same issue, or at least related, to "CB-5712 embedded iframe load causes all subsequent cdv commands to be ignored". 

However, the question for now still remains: is there a workaround for showing external content (like a YouTube video) somewhere in the current Cordova + Kendo Mobile version, using AppBuilder?

0
Kaloyan
Telerik team
answered on 28 Apr 2014, 08:39 AM
Hello J,

Thank you for contacting us.

As you have found out, this is a known issue in Cordova versions 3.2 and 3.3, which I also managed to reproduce, by following your guidelines. Judging from this link, there should be a fix released in Cordova 3.4.

The good news is that, we have planned to release a support for Cordova 3.5 with the next AppBuilder version (AppBuilder 2.2), scheduled for the beginning of June. This should bring a permanent fix for the issue.

However, until then you can check if changing the Cordova version in your project to 3.0 fixes the issue, as it did on my side. You can do this from within your projects properties

I hope this helps. Please, let me know if you need further assistance.

Regards,
Kaloyan
Telerik
 

Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

 
0
MoriartyX64
Top achievements
Rank 1
answered on 28 Apr 2014, 04:03 PM
Confirmed: your suggestion for downgrading to Cordova 3.0 in AppBuilder does fix this iframe problem. 

Although this does present other problems, we can reasonably assume it'll be fixed back in Cordova 3.5 (and AppBuilder 2.2). 
For those interested, the fix for the InAppBrowser can perhaps be helpful as an alternative if downgrading Cordova isn't an option.

Thanks, Kaloyan!
0
Kaloyan
Telerik team
answered on 29 Apr 2014, 06:40 AM
Hello J,

I am happy you have found the most appropriate for you solution. Also, thank you for sharing it with our community.

Please, do not hesitate to contact us again if there is anything else.

Regards,
Kaloyan
Telerik
 

Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

 
Tags
Apple iOS
Asked by
MoriartyX64
Top achievements
Rank 1
Answers by
MoriartyX64
Top achievements
Rank 1
Kaloyan
Telerik team
Share this question
or