Changeset 260

Show
Ignore:
Timestamp:
02/19/08 15:33:17 (9 months ago)
Author:
sup
Message:

Fixed bug with russian letter "b", which is the same keyboard key as ","

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/inputcomplete.js

    r240 r260  
    305305 
    306306    this.dbg("onKeyDown, code="+code+", shift="+e.shiftKey); 
    307  
     307     
    308308    // if comma, but not with a shift which would be "<".  (FIXME: what about other keyboards layouts?) 
    309     if ((code == 188 || code == 44) && ! e.shiftKey && this.caretAtEndOfNotSelected()) { 
     309    //FIXME: may be there is a stable cross-browser way to detect so-called other keyboard layouts - but i don't know anything easier than ... (see onKeyUp changes in tis revision) 
     310    /*if ((code == 188 || code == 44) && ! e.shiftKey && this.caretAtEndOfNotSelected()) { 
    310311        this.moveCaretToEnd(); 
    311312        return Event.stop(e); 
    312     } 
     313    }*/ 
    313314 
    314315    return true; 
     
    322323    var code = e.keyCode || e.which; 
    323324    this.dbg("keyUp = " + code); 
    324  
     325     
     326     
    325327    // ignore tab, backspace, left, right, delete, and enter 
    326328    if (code == 9 || code == 8 || code == 37 || code == 39 || code == 46 || code == 13) 
     
    340342 
    341343    this.dbg("keyUp, got chr="+chr); 
    342  
    343     if (code == 188 || chr == ",") { 
     344    //if (code == 188 || chr == ",") { 
     345    if(/,$/.test(val)){         
    344346        if (! this.caretAtEndOfNotSelected(sel)) { 
    345347            return false;