Changeset View
Changeset View
Standalone View
Standalone View
webroot/rsrc/externals/javelin/lib/control/tokenizer/Tokenizer.js
Show First 20 Lines • Show All 394 Lines • ▼ Show 20 Lines | _onkeydown : function(e) { | ||||
break; | break; | ||||
case 'delete': | case 'delete': | ||||
if (!this._focus.value.length) { | if (!this._focus.value.length) { | ||||
// In unusual cases, it's possible for us to end up with a token | // In unusual cases, it's possible for us to end up with a token | ||||
// that has the empty string ("") as a value. Support removal of | // that has the empty string ("") as a value. Support removal of | ||||
// this unusual token. | // this unusual token. | ||||
var tok; | var tok; | ||||
while ((tok = this._tokens.pop()) !== null) { | while (this._tokens.length) { | ||||
tok = this._tokens.pop(); | |||||
if (this._remove(tok, true)) { | if (this._remove(tok, true)) { | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
break; | break; | ||||
case 'return': | case 'return': | ||||
// Don't subject this to token limits. | // Don't subject this to token limits. | ||||
▲ Show 20 Lines • Show All 122 Lines • Show Last 20 Lines |