Permalink
Browse files

Simplify the way completions are finished

  • Loading branch information...
1 parent 2724a1e commit 74ffe99ed67abb3bd2a4f98a2db246614e9dd3ca @sstephenson sstephenson committed Aug 17, 2009
Showing with 2 additions and 12 deletions.
  1. +1 −6 data/sprockets/alice/src/alice/input.js
  2. +1 −6 data/static/site.js
@@ -12,11 +12,8 @@ Alice.Input = Class.create({
},
onKeyPress: function(event) {
- if (!this.justCompleted && this.completion) {
+ if (event.keyCode != Event.KEY_TAB) {
this.completion = false;
- } else if (this.justCompleted) {
- this.justCompleted = false;
- event.stop();
}
},
@@ -62,14 +59,12 @@ Alice.Input = Class.create({
}
this.completion.next();
- this.justCompleted = true;
},
stopCompletion: function() {
if (this.completion) {
this.completion.restore();
this.completion = false;
- this.justCompleted = true;
}
},
View
@@ -7591,11 +7591,8 @@ Alice.Input = Class.create({
},
onKeyPress: function(event) {
- if (!this.justCompleted && this.completion) {
+ if (event.keyCode != Event.KEY_TAB) {
this.completion = false;
- } else if (this.justCompleted) {
- this.justCompleted = false;
- event.stop();
}
},
@@ -7641,14 +7638,12 @@ Alice.Input = Class.create({
}
this.completion.next();
- this.justCompleted = true;
},
stopCompletion: function() {
if (this.completion) {
this.completion.restore();
this.completion = false;
- this.justCompleted = true;
}
},

0 comments on commit 74ffe99

Please sign in to comment.