Skip to content
Browse files

Revert src/lib/control/typeahead/Typeahead.js

  • Loading branch information...
1 parent 5d5b11b commit c5478d12366ea30074a57a18fbd261d96dae80cd @hedgerwang committed Sep 4, 2012
Showing with 2 additions and 5 deletions.
  1. +2 −5 src/lib/control/typeahead/Typeahead.js
View
7 src/lib/control/typeahead/Typeahead.js
@@ -331,11 +331,8 @@ JX.install('Typeahead', {
* @task control
*/
submit : function() {
- var result = this._focus >= 0 ?
- JX.DOM.scry(this._root, 'a', 'typeahead-result')[this._focus] :
- null;
- if (result) {
- this._choose(result);
+ if (this._focus >= 0 && this._display[this._focus]) {
+ this._choose(this._display[this._focus]);
return true;
} else {
result = this.invoke('query', this._control.value);

0 comments on commit c5478d1

Please sign in to comment.
Something went wrong with that request. Please try again.