Reputation: 394
I have created an application that links to another site, this site has a form (and some javascript in the background)
Due to whatever javascript the page has on any Android 2.2-2.3 device tapping on an Input field does not bring up the soft keyboard and when you force it up you are unable to input anything at all.
My ICS device works perfectly fine with the site (I'm guessing due to the updated mobile browser)
Is there any code I can add to my project that will allow the older 2.2 and 2.3 devices to properly run the javascript or be able to handle the websites input fields correctly?
Here is the site I'm having the issues with: http://fhsdschools.revtrak.net/tek9.asp?pg=products&grp=1
Upvotes: 3
Views: 2882
Reputation: 6033
I faced a similar issue with web view. There is some issue with the focus when we enable the java script. I tried redirecting the focus on touch and the issue was solved. This is what i did:
wv.requestFocus(View.FOCUS_DOWN);
wv.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
switch (event.getAction()) {
case MotionEvent.ACTION_DOWN:
case MotionEvent.ACTION_UP:
if (!v.hasFocus()) {
v.requestFocus();
}
break;
}
return false;
}
});
I hope this will help.
Upvotes: 1
Reputation: 801
Is all of that Javascript really necessary? For such a static webpage, it certainly has a rather large amount of obscure javascript. Maybe the jQuery loaded function is failing, and causing the browser to error out. It is kinda just doing a smash-and-grab tactic with the browser's features until it figures out what works and what doesn't.
Also, use the developer console: https://android.stackexchange.com/questions/5999/android-browsers-aboutdebug-what-do-those-settings-do
Upvotes: 0
Reputation: 498
If ur javascript is enabled and and your have enabled session cookies but still you are not able to enter into the edittext then your current browser doesn't support the script running on that page. Try installing some other internet browser and check if it helps. I dont think adding any code snippet to the project is going to help.
Upvotes: 0