Open a modal, from a modal

10 posts, 0 answers
  1. Kenneth
    Kenneth avatar
    70 posts
    Member since:
    Feb 2008

    Posted 09 Mar 2013 Link to this post

    Pretty simple issue. I can do this. I can see that the 2nd modal opened but it is behind the first modal. I tried by setting z-order but it didn't seem to have an effect.

    Any solutions?
  2. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2877 posts

    Posted 12 Mar 2013 Link to this post

    Hi Kenneth,

    This is not a very common scenario. I tried to reproduce the behaviour using a very simple configuration but to no avail. Could you please check my sample and let me know what I am missing?
    Can you reproduce the issue inside the test page and send me back a link to the updated version? In this way I would be able to examine your configuration in details and assist you further.

    Thank you in advance for the cooperation. Looking forward to your reply.

    Regards,
    Alexander Valchev
    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. Oscar
    Oscar avatar
    173 posts
    Member since:
    Oct 2010

    Posted 19 Aug 2013 Link to this post

    Related to this problem, when you have the second modal window opened, if you click anywhere out of the modal window, the first modal window will close, is there any way to keep the first one opened and close instead only the second one?

    Thanks
  5. Alexander Valchev
    Admin
    Alexander Valchev avatar
    2877 posts

    Posted 21 Aug 2013 Link to this post

    Hello Oscar,

    I am afraid that such scenario is not currently supported.
    Please accept my apology for the inconvenience caused.

    Regards,
    Alexander Valchev
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  6. Oscar
    Oscar avatar
    173 posts
    Member since:
    Oct 2010

    Posted 21 Aug 2013 Link to this post

    Ok Alexander, no problem, thank you.
    I have managed somehow to make it work like I expected.
    $('.km-shim:last').bind('touchstart', function(e) {
        e.stopPropagation();
    });
    So with those lines, though maybe it is not the best way to do it, I can prevent the modalviews from being closed when you click out of them.
    Thanks again.
  7. Rob
    Rob avatar
    1 posts
    Member since:
    Jun 2012

    Posted 26 Aug 2013 Link to this post

    This is a common occurrence in my applications. Really should get this fixed!

    Edit: I tried your fix, but it didnt work.
    I implemented it on the document ready, after my kendo app is initialized and all modals are created.
    What am I doing wrong?

    Also I believe this used to work, but it stopped working when I upgraded to the newest version in order to get the Flat UI addition.
  8. Oscar
    Oscar avatar
    173 posts
    Member since:
    Oct 2010

    Posted 27 Aug 2013 Link to this post

    Yeah, sorry, looks like my fix only works on Icenium (weird).
  9. Craig
    Craig avatar
    43 posts
    Member since:
    Aug 2013

    Posted 18 Nov 2013 Link to this post

    Ran into the issue of the 2nd modal showing up behind the 1st modal myself.

    I found the fix!

    The order of the when the modalview is defined in your HTML page matters.  Define your modal from lowest level to highest level in the HTML:

    Example:

    <div id="foo" data-role="view">
        <a href="#modal1" data-role="button" data-rel="modalview">Open Modal 1</a>
    </div>
     
    <div id="modal1" data-role="modalview" style="width: 90%; height: 70%;">
        modal view 1
        <a href="#modal2" data-role="button" data-rel="modalview">Open Modal 2</a>
    </div>
     
    <div id="modal2" data-role="modalview" style="width: 90%; height: 70%;">
        modal view 2 (I will open up on top of modal view 1 like we want)
    </div>




  10. Don
    Don avatar
    66 posts
    Member since:
    Jun 2012

    Posted 24 Apr 2014 Link to this post

    Unfortunately, Craig's solution is not working for me using Kendo UI Mobile v2013.3.1526.  I have 3 modals that open one on top of the other.  The first two are usually ok but the 3rd always appears sandwiched between the 1st and 2nd.  Please fix this.
  11. Don
    Don avatar
    66 posts
    Member since:
    Jun 2012

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

    UPDATE:  Actually, Craig's fix was on the right track.  However, it appears that it's not that "the order of the when the modalview is defined in your HTML page matters" but rather the order in which the modalviews are initialized.  So, if you are initializing your modalviews in the HTML then Craig was spot on.  However, if you are using jquery syntax to initialize your modalviews, you need to make sure that the ones you want on top are initialized last in the script.  In that situation, the order of <divs> in the HTML doesn't matter.
Back to Top
Kendo UI is VS 2017 Ready