Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

text field not receiving input via iPhone simulator

2,297 views
Skip to first unread message

tbald

unread,
Oct 18, 2012, 1:54:20 PM10/18/12
to phon...@googlegroups.com
Hello,
   I am developing a simple demo project in Xcode.  I started with the default project, then added a little login form when it finished loading.  This form is hidden until we call the "onDeviceReady" function.  Basically, I just added code to hide the "receivedElement" and show my new "loginElement".  It displays just fine, but it won't let me type anything.  It is hidden by default ( via CSS ).  Why can't I type in the field?

Then I display it by default, and I still cannot type in the field.

Note in both cases, I have the keyboard and everything.  I can see the keys "clicking", but nothing displays in the text field.

Finally, I bring it up in the browser ( with it displayed by default - it has no device to connect to, so I have to display it by default ).  I can type in those fields just fine.


So what am I doing wrong?  Is there any simple form out there that just lets me type information?

Tony

Kerri Shotts

unread,
Oct 18, 2012, 2:07:08 PM10/18/12
to phon...@googlegroups.com
Phonegap version?
iOS version?

______________________________
Kerri Shotts
photoKandy Studios LLC

📱 Phone: +1 (312) 380-1035
🌐 Web: http://photokandy.com 

Twitter: @photokandy

--
-- You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en
 
For more info on PhoneGap or to download the code go to www.phonegap.com
 
To compile in the cloud, check out build.phonegap.com
 
 

tbald

unread,
Oct 18, 2012, 2:18:00 PM10/18/12
to phon...@googlegroups.com
phongap version:                  Latest phonegap version, downloaded this week: phonegap-phonegap-26d211b ( zip file name ).  Also, the "VERSION" file has 2.1.0
iOS version:                         Just using simulator, normally going to iPhone 5.1 Simulator


OS of development machine: Mac OS X 10.7.5
Xcode version:                      4.5.1 ( 4G1004 )

Kerri Shotts

unread,
Oct 19, 2012, 12:03:39 AM10/19/12
to phon...@googlegroups.com
If you tap the edit fields, does the keyboard appear?


______________________________
Kerri Shotts
photoKandy Studios LLC

📱 Phone: +1 (312) 380-1035
🌐 Web: http://photokandy.com 

Twitter: @photokandy

tbald

unread,
Oct 19, 2012, 10:57:15 AM10/19/12
to phon...@googlegroups.com
yes, it just does not let me type anything.  Like I said earlier, I can even see it clicking.



Note in both cases, I have the keyboard and everything.  I can see the keys "clicking", but nothing displays in the text field.

It did the same thing in the blackberry simulator, if that helps.  I have included a zip file of the application files.  Note that what I have included just what would be in the www folder, minus the cordova javascript stuff.  I used this same folder for copying source code to other platforms.  Obviously my blackberry version has the blackberry cordova JS file, and my iOS version has the iOS cordova JS file.  Tell me if you need something else.  Thanks again.

Tony
wmsVisionDemoApp.zip

tbald

unread,
Oct 23, 2012, 11:21:28 AM10/23/12
to phon...@googlegroups.com
Any idea on this issue?  Do you need more information?  Any help you can give would be much appreciated.  What is really confusing me is that if I bring it up in firefox, it works fine.  Maybe I need to try some other browsers on my PC?

Kerri Shotts

unread,
Oct 23, 2012, 11:43:22 AM10/23/12
to phon...@googlegroups.com
Found it!

After taking a look at your code, the following CSS rule was blocking the input fields from working:

* { -webkit-user-select: none; }

This is a great rule to have in place, since you don't want users to select text on your page, but it also blocks proper functioning of the input boxes, since they also can't select text. As to why iOS pops up the keyboard just to fool with you, I'm not sure -- because that implies that it something's editable. I guess it's just a bug or something Apple's overlooked. (This also confuses the remote debug functionality of Safari 6 like all get out…)

Anyway, I would try to do something like this in your CSS:

input { -webkit-user-select: text; } (or auto)

and see if it takes. It should, but for my purposes, I just disabled the rule on the entire page. So read the "should" with air-quotes. ;-)

Hope that helps?

_________________________________________
~Kerri Shotts, photoKandy Studios LLC
   Wanna be our neighbor? Our Facebook page & Twitter feed.

--

tbald

unread,
Oct 23, 2012, 12:04:26 PM10/23/12
to phon...@googlegroups.com
Thanks so much.  That worked.

Kyle Peyton

unread,
Dec 7, 2018, 5:54:48 PM12/7/18
to phonegap
Kerri you are an internet hero for this comment. I had no idea this CSS rule would be problematic for inputs. Thank you!
Reply all
Reply to author
Forward
0 new messages