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

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

2 Answers 74 Views
ModalView
This is a migrated thread and some comments may be shown as answers.
M
Top achievements
Rank 1
M asked on 17 Oct 2012, 04:11 AM
<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>
    </div>
  </div>
  <p style="text-align:center; margin-top:10px;">Hours</p>
  <a data-click="closeModalView" data-role="button" data-align="right">Close</a>
</div>


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 Answers, 1 is accepted

Sort by
0
Collin
Top achievements
Rank 2
answered on 01 Feb 2013, 05:51 PM
Same problem here. Did you find a solution? I opened a support ticket too... waiting for response on that still.
0
Alexander Valchev
Telerik team
answered on 06 Feb 2013, 02:38 PM
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!
Tags
ModalView
Asked by
M
Top achievements
Rank 1
Answers by
Collin
Top achievements
Rank 2
Alexander Valchev
Telerik team
Share this question
or