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

5 posts, 0 answers
  1. MoriartyX64
    MoriartyX64 avatar
    19 posts
    Member since:
    Jun 2013

    Posted 23 Apr 2014 Link to this post

    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?
  2. MoriartyX64
    MoriartyX64 avatar
    19 posts
    Member since:
    Jun 2013

    Posted 24 Apr 2014 in reply to MoriartyX64 Link to this post

    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?

  3. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 28 Apr 2014 Link to this post

    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!

     
  4. MoriartyX64
    MoriartyX64 avatar
    19 posts
    Member since:
    Jun 2013

    Posted 28 Apr 2014 in reply to Kaloyan Link to this post

    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!
  5. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 29 Apr 2014 Link to this post

    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!

     
Back to Top