Ticket #2641: event.js_8264.patch

File event.js_8264.patch, 476 bytes (added by guest, 20 months ago)

patch for issue introduced in rev.8264: evt.keyCode is read-only in IE if key is ctrl or shift, thus try/catch is required, as already implemented elsewhere in the same file

  • event.js

     
    336336                                                        c=99; // Mozilla maps CTRL-BREAK to CTRL-c 
    337337                                                } 
    338338                                                evt.charCode = c; 
    339                                                 evt.keyCode = (c ? 0 : evt.keyCode); 
     339                                                try{if(c){ evt.keyCode = 0; }}catch(e){}; // squelch errors when keyCode is read-only (e.g. if keyCode is ctrl or shift) 
    340340                                                de._fixKey(evt); 
    341341                                                break; 
    342342                                }