handleKey(): if .charCode is undefined, use .keyCode (Opera compatible.)

This commit is contained in:
Sigbjorn Finne 2010-12-05 16:50:00 +08:00 committed by BigEd
parent 78deb4aaa4
commit 1c66a8af28

View File

@ -102,7 +102,7 @@ function setup_part3(){
/////////////////////////
function handleKey(e){
var c = e.charCode;
var c = e.charCode || e.keyCode;
c = String.fromCharCode(c);
if('zx<>?np'.indexOf(c)==-1) return;
if((c=='x' || c=='<') && zoom>1) setZoom(zoom/1.2);