harold-UIUX / jquery-ui-for-ipad-and-iphone

Automatically exported from code.google.com/p/jquery-ui-for-ipad-and-iphone
0 stars 0 forks source link

iPad2: Tap on input-field doesn't show keyboard for value entry #17

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. use jquery.touch.js
2. take an HTML-page with ohne <input type=text ...> element
3. tap on the input-field

What is the expected output? What do you see instead?
EXPECTED: Without jquery.touch.js the iPad2-keyboard shows up and it is 
possible to enter values into the input field.

INSTEAD: no iPad2-Keyboard shows up, it is not possible to enter values into an 
HTML input field

What version of the product are you using? On what operating system?
iPad2, jquery.touch.js FEB 2011

Please provide any additional information below.

The problem could be solved applying the following patch in jquery.touch.js 
(see comments OLD + NEW):

function iPadTouchHandler(event) {
    var type = "",
        button = 0; /*left*/

    if (event.touches.length > 1)
        return;

    switch (event.type) {
        case "touchstart":

// OLD: On iPad2 clicking on a text input field did not show the keyboard
//          if ($(event.changedTouches[0].target).is("select")) {
// NEW: Now on iPad2 the touchstart-Event on input fields is ignored and 
everything works fine
// change my by Roland Caspers, Scheer Management
            if ($(event.changedTouches[0].target).is("select") || $(event.changedTouches[0].target).is("input")) {

                return;
            }
            iPadTouchStart(event); /*We need to trigger two events here to support one touch drag and drop*/
            event.preventDefault();
            return false;
            break;

Original issue reported on code.google.com by roland.c...@googlemail.com on 10 Feb 2012 at 5:21

GoogleCodeExporter commented 8 years ago
Hi,

This code is working perfectly at iOS5, the same code (.epub) is not working on 
the iOS6. Much appreciated receiving the revised code.

G

Original comment by gthukka...@gmail.com on 26 Sep 2012 at 11:09

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
how can i do if i want to type as password in text box? because when i follow 
by your codes above it's appear all text show but now i need to type password 
kind of text box

Original comment by toeurt...@gmail.com on 22 Dec 2012 at 2:10

GoogleCodeExporter commented 8 years ago
I modified Roland's patch to fix the original problem for iOS6.1.3 on an iPad 
4, but I have no other iThings for testing it.

The updated patch goes into the "touchstart" case in iPadTouchHandler(), and it 
can be applied either to this plugin or to Josh Gerdes's version on GitHub to 
fix this problem:

        switch (event.type) {
            case "touchstart":
                if ($(event.changedTouches[0].target).is("select")) {
                    return;
                }
            // patch begins here
                if ($(event.changedTouches[0].target).is("input")) {
                    return false; // allow access to keyboard on text input
                }
            // patch ends here
                iPadTouchStart(event); /*We need to trigger two events here to support one touch drag and drop*/
                event.preventDefault();
                return false;
                break;

Original comment by georges....@gmail.com on 7 Apr 2013 at 3:04