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

ModalView with input text field, closing on Android when keyboard appears.

1 Answer 216 Views
ModalView
This is a migrated thread and some comments may be shown as answers.
Michael
Top achievements
Rank 1
Michael asked on 23 Dec 2012, 02:59 PM
Hi There,

I have a ModalView with an input text field, which closes on Android as soon as the onscreen keyboard appears.

In the browser (Chrome) it works ok, here's the source.

<div data-role="modalview" id="modalview-add-to-cart" style="width: 95%; height: 270px;">
  <div data-role="header">
    <div data-role="navbar">
      <span>Add to order</span>
      <a data-click="closeModalView" data-role="button" data-align="right">Cancel</a>
    </div>
  </div>
  <div class="modal-view-inset">
    <div id="modalview-add-to-cart-order"></div>
    <div><input type="text"
    id="modalview-add-to-cart-customer-note" placeholder="Any special instructions?"></input></div>
  </div>
  <div data-role="footer">
    <a data-click="addToCart" type="button"
       data-role="button">Add To Your Order</a>
  </div>
</div>
I'm invoking it from a function call (triggered by a data-role="touch" data-tap="handler")
$('#modalview-add-to-cart').data("kendoMobileModalView").open();
However, if I launch it using:
<a data-rel="modalview" href="#modalview-add-to-cart" class="menu-item-buy" >+</div>
It works as expected,  how can I stop it closing when opened by the javascript?



   

1 Answer, 1 is accepted

Sort by
0
Michael
Top achievements
Rank 1
answered on 24 Dec 2012, 07:37 AM
Appears to be fixed in  kendoui.mobile.2012.3.1210
Tags
ModalView
Asked by
Michael
Top achievements
Rank 1
Answers by
Michael
Top achievements
Rank 1
Share this question
or