Skip to content

Commit

Permalink
Simplify the way completions are finished
Browse files Browse the repository at this point in the history
  • Loading branch information
sstephenson committed Aug 17, 2009
1 parent 2724a1e commit 74ffe99
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions data/sprockets/alice/src/alice/input.js
Expand Up @@ -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();
}
},

Expand Down Expand Up @@ -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;
}
},

Expand Down
7 changes: 1 addition & 6 deletions data/static/site.js
Expand Up @@ -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();
}
},

Expand Down Expand Up @@ -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;
}
},

Expand Down

0 comments on commit 74ffe99

Please sign in to comment.