if ( !allowUserEnteredZero ) { // wrap this to see if we allow zeroes while ( this.intCount > this.zeroIntLen ) { if ( this.editValue.charAt( i ) == '0' ) { this.intCount--; } else if ( this.editValue.charAt( i ) != this.symbols.getGroupingSeparator() ) { break; } this.editValue.deleteCharAt( i ); if ( cursorPos > i ) { cursorPos--; } } }