Input implementation that seems to work in IE, FF and Chrome (all tested on Windows only)

This commit is contained in:
Inez Korczynski 2012-02-28 00:21:54 +00:00
parent aa2e0615b7
commit fe7a223746
Notes: Inez Korczynski 2012-02-28 00:21:54 +00:00

View file

@ -93,7 +93,7 @@ app.prototype.loopFunc = function() {
var lengthDiff = text.length - this.prevText.length, var lengthDiff = text.length - this.prevText.length,
offsetDiff = offset - this.prevOffset; offsetDiff = offset - this.prevOffset;
if ( lengthDiff === offsetDiff && offset !== null && this.prevOffset !== null ) { if ( lengthDiff === offsetDiff && offset !== null && this.prevOffset !== null && this.prevText.substring( 0, this.prevOffset ) === text.substring( 0, this.prevOffset ) ) {
console.log("new text", text.substring( this.prevOffset, offset ), this.prevOffset); console.log("new text", text.substring( this.prevOffset, offset ), this.prevOffset);
} else { } else {
var sameFromLeft = 0, var sameFromLeft = 0,