ModalView doesn't open unless I have data-role="button"

3 posts, 0 answers
  1. M
    M avatar
    4 posts
    Member since:
    Oct 2012

    Posted 16 Oct 2012 Link to this post

    <a href="#moreModalView" data-rel="modalview" id="moreButton" data-role="button">More...</a>

    <div data-role="modalview" id="hoursModalView">
      <div data-role="header" class>
        <div data-role="navbar">
          <span>More Info</span>
      <p style="text-align:center; margin-top:10px;">Hours</p>
      <a data-click="closeModalView" data-role="button" data-align="right">Close</a>

    I have a ModalView as seen above. However, if I remove the data-role="button" from the link, clicking the link does not do anything. It actually prevents any scrolling and the back button in my header from working.
    The ModalView div is inside the View div that the link is in. 
    This is all part of a Phonegap App.

    Any ideas as to why this might happen?
  2. Collin
    Collin avatar
    5 posts
    Member since:
    Sep 2011

    Posted 01 Feb 2013 Link to this post

    Same problem here. Did you find a solution? I opened a support ticket too... waiting for response on that still.
  3. Alexander Valchev
    Alexander Valchev avatar
    2873 posts

    Posted 06 Feb 2013 Link to this post

    Hello guys,

    I have already replied to the support ticket that Collin submitted. For your convenience I am pasting my reply here as well so the other users can read it.

    This is not supported - modal View can be opened only by navigational widgets (button, ListView, TabStrip) or using JavaScript. We do not capture the click on standard anchors.

    I believe that you got confused by the code snippet examples from the documentation, which were wrong. I am glad to inform you that they are fixed now. Please accept my apology for the inconvenience caused.

    Best 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!
Back to Top