summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbehdad@chromium.org <behdad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-12 20:19:51 +0000
committerbehdad@chromium.org <behdad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-12 20:19:51 +0000
commit791dde56613234c90fb0e4444cacabd7674610b7 (patch)
treeae4e3ca56ea4e64efd1009893cfa032242513451
parent81ddd9d97ffd563594fe75cee7b8537bbe9bcf0d (diff)
downloadchromium_src-791dde56613234c90fb0e4444cacabd7674610b7.zip
chromium_src-791dde56613234c90fb0e4444cacabd7674610b7.tar.gz
chromium_src-791dde56613234c90fb0e4444cacabd7674610b7.tar.bz2
[keyboard] Hook-up ontouchstart handler
This way, when touch-typing, keys are emitted as soon as touch is made, ie. finger down, not when finger up which is what onclick does. We still keep onclick for mouse to work. BUG= TEST=Tested on device by pointing browser to the keyboard index.html and alert() on sendKey events. Review URL: http://codereview.chromium.org/6969018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85173 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/resources/keyboard/main.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/chrome/browser/resources/keyboard/main.js b/chrome/browser/resources/keyboard/main.js
index 76ae15a..c4b547e 100644
--- a/chrome/browser/resources/keyboard/main.js
+++ b/chrome/browser/resources/keyboard/main.js
@@ -175,8 +175,9 @@ Key.prototype = {
this.sizeElement(mode, height);
- this.modeElements_[mode].onclick =
- sendKeyFunction(this.modes_[mode].keyIdentifier);
+ var cb = sendKeyFunction(this.modes_[mode].keyIdentifier);
+ this.modeElements_[mode].onclick = cb;
+ this.modeElements_[mode].ontouchstart = cb;
return this.modeElements_[mode];
}