Form fields do not work on iPhone #11

Open
imnlink opened this Issue May 29, 2012 · 6 comments

Projects

None yet

5 participants

@imnlink
imnlink commented May 29, 2012

I have a document containing form fields (input, textarea, radio/checkbox) that scrolls fine on Android, but on iPhone, the form fields do not work (when clicking them nothing happens). I am testing on a first generation iPhone with iOS version 3.1.3.
To replicate the issue, just add an input field to one of your examples and open the document on an iPhone (other versions that 3.1.3 might work fine, but I have no way right now to test a different version). Can someone confirm the issue and perhaps provide a solution? Thanks.

@imnlink
imnlink commented May 31, 2012

I investigated the problem a little bit more. SELECT fields work fine, INPUT text/radio/checkbox don't work. When I check in the start function the type of element on which the scroll started, it rarely gives input (when "clicking" on an input field). really strange. Hope this helps.

@imnlink
imnlink commented May 31, 2012

In the "start" function I changed setPointers("none") to setPointers("auto") and in the "end" function I replaced the setPointers code (with setTimeOut) by the line setPointers("none"). It seems to work fine now, but I worried that I broke something on other versions of the OS. Could someone test this solution on a more recent iPhone? Thanks.

@frequent

@imnlink: I'm running iOS 3.2

All elements work here. Although I commented out the 2nd part of the hashscroll extension

/*
w.document.addEventListener( "click", function( e ){
     var link = e.target;
        if( link && link.className.indexOf( "throw" ) > -1 ){
            var hash = link.href.split( "#" )[ 1 ],
                elem = w.document.getElementById( hash );
                    if( elem ){
                        e.preventDefault();
                        scrollToElem( elem );
                        w.location.hash = hash;
                        }
                    }
        }, false);
*/
@stoeffel

I had the same issue on my htc desire s (android 2.3). The fix from @imnlink did work for me.

@xfg
xfg commented Sep 17, 2014

I have the same problem, but I can't find a part code from frequent. Where it look for?

@Igor10k
Igor10k commented Apr 5, 2016

On Android 2.3 I had a textarea that worked only the first time I tapped it. Had to comment out all the mentions of setPointers to make it work right. Thanks for pointing at that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment