I have an Android 3.0 App with a WebView inside. The webview opens an website which uses java script. Opening the Website works fine. But whenever I click on a TextField, the keyboard doesn’t appear.
I’ve already tried:
Tapping form field in WebView does not show soft keyboard
but no success. The keyboard seems to appear very shortly and thereafter disappears.
From my point of view this is caused by some javascript. This is the html of one of the input fields:
<input id="ToolbarOkCode" class="urEdf2TxtEnbl" type="Text" style="text-align:;width:150px;" value="" name="ToolbarOkCode" lsevents="{'Change':[{'ClientAction':'none'},{'type':'TOOLBARINPUTFIELD'}],'Enter':[{'ClientAction':'submit','PrepareScript':'return its.XControlSubmit();','ResponseData':'delta','TransportMethod':'partial'},{'type':'TOOLBARINPUTFIELD','~XRequest':'X'}]}" lsdata="{0:'',1:'',2:'',3:20,4:200,5:false,6:false,7:true,8:false,9:false,10:'STRING',11:'F4LOOKUP',12:'150px',13:'LEFT',14:false,15:'',16:false,17:false,18:false,19:'AUTO',20:true,21:'NONE',22:'MM/dd/yyyy',23:false,24:'',25:'',26:false,27:false,28:'',29:'NORMAL',30:1,31:false,32:0,33:0}" ct="I" autocomplete="off" ti="0" tabindex="0" maxlength="200">
I found the solution for my problem, It’s pretty specific though, I hope it will help someone sometime…
I extended
WebViewClient, and overrode few of its functions.my issue started when I loaded a propitiatory
javascript:ononLoadResource(). For some reason, doing so caused the whole keyboard abnormality. I moved the script to run ononPageFinished()and theWebViewacts normally again.