Firefox prompt huge fix, Issue #59

This commit is contained in:
Peter Cottle 2013-03-02 10:39:54 -08:00
parent a7c2b8936c
commit d17d131d24
7 changed files with 18 additions and 10 deletions

View file

@ -19580,7 +19580,7 @@ var CommandPromptView = Backbone.View.extend({
},
onKeyDown: function(e) {
var el = e.srcElement;
var el = e.srcElement || e.currentTarget;
this.updatePrompt(el);
},
@ -19637,7 +19637,7 @@ var CommandPromptView = Backbone.View.extend({
cursorUpdate: function(commandLength, selectionStart, selectionEnd) {
if (selectionStart === undefined || selectionEnd === undefined) {
selectionStart = commandLength - 1;
selectionStart = Math.max(commandLength - 1, 0);
selectionEnd = commandLength;
}
@ -26203,7 +26203,7 @@ var CommandPromptView = Backbone.View.extend({
},
onKeyDown: function(e) {
var el = e.srcElement;
var el = e.srcElement || e.currentTarget;
this.updatePrompt(el);
},
@ -26260,7 +26260,7 @@ var CommandPromptView = Backbone.View.extend({
cursorUpdate: function(commandLength, selectionStart, selectionEnd) {
if (selectionStart === undefined || selectionEnd === undefined) {
selectionStart = commandLength - 1;
selectionStart = Math.max(commandLength - 1, 0);
selectionEnd = commandLength;
}