[Android] WebView unable to write into input fields

Hello everyone,

Today I have a quick post with a solution to a problem i recently had ( a dumb one )…

I was working on an Android application in which I had to display a WebView which loaded a page, everything looked nice and it was free to go!…but then wait!

I was unable to type into input fields, and the horror started (Ahhhhhh!). I’ve went through searching and reading so many articles on similar problems, I even went through the Android documentation searching wherever I’m forgetting to set a property in the WebView.

But nahh no solution worked (At least I learned a bunch of stuff while reading and trying 😉 ), so I went into hardcore debugging mode NA NA NA NA!, I went through checking every single JS file and every CSS file on the page if there might be something wrong…. and BAM! there it was…. As I didn’t like the border when selecting text on the page I had previously used a CSS property to disable user selection….  ( ̄□ ̄;)

 

-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;

This little property caused me a headache…, believe it or not. After finding the solution a good friend of mine gave me the idea to post this into my blog, in case somebody else might have the same problem, and this could be the solution to it.

So here you go, If someone find this one useful, please let me know so we can laugh together on how funny the solution was.  (⌒▽⌒)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s