Resizing browser causes ModalView to close

4 posts, 0 answers
  1. Brian Hearn
    Brian Hearn avatar
    6 posts
    Member since:
    May 2010

    Posted 13 Sep 2012 Link to this post

    We have built an application for mobile and desktop and in all browsers/version tested, an open KendoMobileModalView closes when the browser is resized. How can we prevent this?

    The line of code in kendo.mobile.js that is the culprit is 9951: if (!that._hovered) { that.close();}

    Commenting this out resolved the issue but I'm concerned about the side effects of removing this code.
  2. Iliana Nikolova
    Admin
    Iliana Nikolova avatar
    2592 posts

    Posted 17 Sep 2012 Link to this post

    Hi Brian,

    I am afraid what you trying to achieve is not supported, since the Kendo UI ModalView is not meant to work on Desktop browsers.
     
    Regards,
    Iliana Nikolova
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Brian Hearn
    Brian Hearn avatar
    6 posts
    Member since:
    May 2010

    Posted 17 Sep 2012 Link to this post

    First off, we are in fact using Kendo Mobile UI in a very complex application that works on both desktop and mobile. It's working quite well in fact. Second, I cannot imagine any valid use case for removing a modal dialog on a window resize that already supports repositioning as the browser is resized. Thirdly, commenting out the couple of lines of code I mentioned works fine and we've seen no issues in production.
  5. Petyo
    Admin
    Petyo avatar
    2438 posts

    Posted 18 Sep 2012 Link to this post

    Hello Brian,

    The modalview widget shares common code with the Kendo UI web widgets (the popup for the dropdowns, to be more specific), hence the behavior you exhibit. As Iliana already mentioned, Kendo UI Mobile is targeting mobile devices exclusively, and we did not consider this use case as a possible problem for our customers. 

    If you do not use any of the form widgets in your project (or their popups staying open is not a problem for your case), feel free to comment out the lines you have already discovered. 

    Kind regards,
    Petyo
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready