laviastar / iscroll-js

Automatically exported from code.google.com/p/iscroll-js
MIT License
2 stars 2 forks source link

Touch doesn't work (selection of elemtnts in iscroll used page) #57

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

Now, i can't select any element in the page, only scrolling function is allowed.

iscroll 4

Using iscroll in development of an application for iphone.

Original issue reported on code.google.com by ganeshkg...@yahoo.co.in on 23 May 2011 at 10:28

GoogleCodeExporter commented 9 years ago
I just wanted to say that this happens for a project I have been working on as 
well. Verified on android 2.1, 2.2 and 2.3 using an HTC Magic, Dell Streak, 
Nexus One, Nexus S... I think more as well. Can't remember off the top of my 
head.

The very first time a page is loaded, I can sometimes click the text input. 
Every other time touching the input does not work. I can also get the soft 
keyboard to display sometimes by tapping quickly on the input element and then 
tapping where the keyboard should display.

We did manage to get things working with some js hacks:

myScroll = new iScroll('wrapper'), {
                    onBeforeScrollStart: function (e) {
                            var target = e.target;
                            while (target.nodeType != 1) target = target.parentNode;
                            if (target.tagName != 'SELECT' && target.tagName != 'INPUT' && target.tagName != 'TEXTAREA')
                                    e.preventDefault();
                    }
              });

Original comment by mcarp...@gmail.com on 10 Jul 2011 at 9:40