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

Button onclick does not fire on first click

3 Answers 83 Views
Report a bug
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brian
Top achievements
Rank 1
Brian asked on 27 Dec 2012, 09:08 PM
I have a button in my HTML with an onclick event.  It is not firing on the first try.  I tried to add an alert(); to the onclick to see if the issue was the event firing or my code and it turns out, it is the event firing.  Code for the button is below.  Thoughts on how to fix it?  The issue is not happening in Graphite or Mist.

<input type="button" onclick="Pendings.addAccount();" value="submit"/>

3 Answers, 1 is accepted

Sort by
0
Brian
Top achievements
Rank 1
answered on 27 Dec 2012, 09:11 PM
<a data-role="button" onclick="Pendings.addAccount();">Submit</a>

The above has the same issue.
0
Brian
Top achievements
Rank 1
answered on 27 Dec 2012, 09:34 PM
Turns out it is an Apple thing.  use onTouchStart or onTouchEnd.  Otherwise, you are subject to a 300ms delay that any other touch will interrupt.  It is compensating for gestures.
0
Jordan
Telerik team
answered on 28 Dec 2012, 01:12 PM
Hello,

yes it is a known issue and it has relation to the zoom and scrolling as well.
Depending on your project it may be worth checking some mobile frameworks as jQuery Mobile, Kendo UI Mobile etc. as they provide a workarounds for this and many other mobile challenges and give the HTML applications more native look and feel.

Happy holidays,
Jordan
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Pluralsight.
Tags
Report a bug
Asked by
Brian
Top achievements
Rank 1
Answers by
Brian
Top achievements
Rank 1
Jordan
Telerik team
Share this question
or