diff options
author | Scott Main <smain@google.com> | 2010-01-28 15:06:03 -0800 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2010-01-28 15:06:03 -0800 |
commit | 80ec85cc47581c51d3bbba3fe59df058472ab020 (patch) | |
tree | bd2bb4784955cf6944e1226c404731424899f93b /tools | |
parent | 5993b091940dc2e50ccc31b603bed6608b723f27 (diff) | |
parent | 5729dbfa00ffb659c5758195b617af4349c0ef75 (diff) | |
download | build-80ec85cc47581c51d3bbba3fe59df058472ab020.zip build-80ec85cc47581c51d3bbba3fe59df058472ab020.tar.gz build-80ec85cc47581c51d3bbba3fe59df058472ab020.tar.bz2 |
am 5729dbfa: am e6fed880: Merge "docs: accept the enter key on key-down, rather than key-up, in order to be sure we capture this key before anything else. Fixes case where highlighted suggestions don\'t get executed when pressed. Bug: 1909300" into eclair
Merge commit '5729dbfa00ffb659c5758195b617af4349c0ef75'
* commit '5729dbfa00ffb659c5758195b617af4349c0ef75':
docs: accept the enter key on key-down, rather than key-up,
Diffstat (limited to 'tools')
-rw-r--r-- | tools/droiddoc/templates/assets/search_autocomplete.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/droiddoc/templates/assets/search_autocomplete.js b/tools/droiddoc/templates/assets/search_autocomplete.js index 086674a..4fa47a5 100644 --- a/tools/droiddoc/templates/assets/search_autocomplete.js +++ b/tools/droiddoc/templates/assets/search_autocomplete.js @@ -107,11 +107,13 @@ function search_changed(e, kd, toroot) var text = search.value; // 13 = enter - if (!kd && (e.keyCode == 13)) { + if (e.keyCode == 13) { document.getElementById("search_filtered_div").className = "no-display"; - if (gSelectedIndex >= 0) { + if (kd && gSelectedIndex >= 0) { window.location = toroot + gMatches[gSelectedIndex].link; return false; + } else if (gSelectedIndex < 0) { + return true; } } // 38 -- arrow up |