Added iOS work-around for preventing unintentional page zooms when returning focus from a soft-key control to the normal keyboard control
This commit is contained in:
parent
b6388f51fc
commit
3c376df42c
6 changed files with 22 additions and 4 deletions
|
|
@ -174,7 +174,7 @@ pf:qf);break}if(p<A)a.ga[p++]=w;else break}if(f)f--;else{for(;p<a.ga.length;)a.g
|
|||
ya,S,La,cc,K,ia,ta,ma))}h++}g++}e++}}a.W=!0;!b&&a.ya&&1==h&&(a.A[l]=-1,h=0);a.ya=!1;(h||b)&&a.wa&&a.j.drawImage(a.D,0,a.sa,a.C,a.N-a.ba,0,0,a.Ab,a.sd)}else{e=a.la;f=e+a.L;l=h=g=0;b=a.C;p=0;c=a.N;t=d=0;r=a.na;A=(1<<r)-1;a.vd&&(r=-r,t=16+r);for(;e<f;){u=Gb(a.H,e);if(a.W&&u===a.A[g])h+=a.fb;else{a.A[g]=u;(B=t)&&(u=u>>8|(u&255)<<8);h<b&&(b=h);for(w=a.fb;w--;)ya=u>>B&A,kf(a,a.Ua,h++,l,ya),B+=r;h>p&&(p=h);l<c&&(c=l);l>=d&&(d=l+1)}e+=2;g++;if(h>=a.C&&(h=0,l++,l>a.N))break}a.W=!0;b<a.C&&(e=p-b,d-=c,a.g&&
|
||||
(f=b,g=e,b=c,e=d,c=a.C-(f+g),d=g),a.wa.putImageData(a.Ua,0,0,b,c,e,d),a.j.drawImage(a.D,0,0,a.D.width,a.D.height,0,0,a.M,a.I))}}var bf=0,cf=1,$e=2,We=0,af=1,df=2,Ve={SI1978:af,VT100:df},ef=96,gf=64,hf=32,jf=0,lf=127,nf=15,of=16,mf=96,pf=8192,qf=16384;
|
||||
hb(function(){for(var a=pa(document,"pc8080","video"),b=0;b<a.length;b++){var c=a[b],d=na(c),e=document.createElement("canvas");if(!e||!e.getContext){c.innerHTML="<br/>Missing <canvas> support. Please try a newer web browser.";break}e.setAttribute("class","pcjs-canvas");e.setAttribute("width",d.screenWidth);e.setAttribute("height",d.screenHeight);e.style.backgroundColor=d.screenColor;e.style.height="auto";0<=Ua().indexOf("MSIE")&&(c.onresize=function(a,b,c,d){return function(){b.style.height=
|
||||
(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||cb("aspect"));f&&.3<=f&&3.33>=f&&(gb("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");bb("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"));c.appendChild(f);var g=e.getContext("2d"),d=new Ue(d,e,g,f,c);oa(d,c)}});
|
||||
(a.clientWidth*d/c|0)+"px"}}(c,e,d.screenWidth,d.screenHeight),c.onresize());var f=+(d.aspect||cb("aspect"));f&&.3<=f&&3.33>=f&&(gb("onresize",function(a,b,c){return function(){b.style.height=(a.clientWidth/c|0)+"px"}}(c,e,f)),window.onresize());c.appendChild(e);f=document.createElement("textarea");bb("iOS")&&(f.setAttribute("autocapitalize","off"),f.setAttribute("autocorrect","off"),f.style.fontSize="16px");c.appendChild(f);var g=e.getContext("2d"),d=new Ue(d,e,g,f,c);oa(d,c)}});
|
||||
function rf(a){n.call(this,"SerialPort",a,8388608);this.T=+a.adapter;switch(this.T){case 0:this.U=0;this.X=2;break;default:q("Unrecognized serial adapter #"+this.T);return}this.g=this.j=null;this.V=a.tabSize;this.S=a.charBOL;this.w=0;this.N=!1;this.D=!0;var b=a.binding;if("console"==b)this.j="";else{var c;a=sf;b&&(void 0===c&&(c="Panel"),(c=la(c,this.id))&&(b=c.P[b])&&this.ca(null,a,b))}this.A="";this.b=this.Ra=this.I=null;this.exports={connect:this.jc,receiveData:this.Lb,receiveStatus:this.ce}}
|
||||
ba(rf,n);k=rf.prototype;
|
||||
k.ca=function(a,b,c,d){var e=this;switch(b){case sf:return this.P[b]=this.g=c,c.onkeydown=function(a){a=a||window.event;var b=a.keyCode;if(8===b||a.ctrlKey&&65<=b&&90>=b)a.preventDefault&&a.preventDefault(),64<b&&(b-=64),tf(e,b);return!0},c.onkeypress=function(a){a=a||window.event;tf(e,a.which||a.keyCode);a.preventDefault&&a.preventDefault();return!0},c.removeAttribute("readonly"),!0;default:if(d)return this.P[b]=c,d=d.replace(/\\e/g,String.fromCharCode(27)),c.onclick=function(){e.Lb(d);return!0},
|
||||
|
|
|
|||
Loading…
Reference in a new issue