0

I've implemented a simple number pad in my web app. When I run it from my computer, it runs fine. The buttons respond as quickly as I can tap them. When I run it from my (first generation) Kindle Fire, the buttons' response is at most 2 buttons/second. I've stripped practically everything from my app which leaves only the following html file that is still slow.


<!DOCTYPE html>
<html>
    <head>
        <title>TestButtons</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width">
    </head>
    <body>
        <div id="NumPad">
            <br/>
            <input type="button" value="7" style="width:56px;height:56px;"/>
            <input type="button" value="8" style="width:56px;height:56px;"/>
            <input type="button" value="9" style="width:56px;height:56px;"/>
            <br/>
            <input type="button" value="4" style="width:56px;height:56px;"/>
            <input type="button" value="5" style="width:56px;height:56px;"/>
            <input type="button" value="6" style="width:56px;height:56px;"/>
            <br/>
            <input type="button" value="1" style="width:56px;height:56px;"/>
            <input type="button" value="2" style="width:56px;height:56px;"/>
            <input type="button" value="3" style="width:56px;height:56px;"/>
            <br/>
        </div>
    </body>

What am I doing wrong? This "app" can be run at: http://www.bwh2566.co.nf/TestButtons/

Reeno
  • 5,720
  • 11
  • 37
  • 50

1 Answers1

0

Use fastclick to remove the browser's click delay.

From the fastclick README:

...mobile browsers will wait approximately 300ms from the time that you tap the button to fire the click event. The reason for this is that the browser is waiting to see if you are actually performing a double tap.

pdoherty926
  • 9,895
  • 4
  • 37
  • 68