randolph249 / iscroll-js

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

Touch on a Select Object wont trigger the default event ( focus() ) #14

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a div
2. Put inside a select object with some options
3. Call iScroll with the id of the previously created div

What is the expected output? What do you see instead?
I expect the same event as when I click on the object, a focus() event. What I 
get instead is a fake click that dont trigger anything.

What version of the product are you using? On what operating system?
3.4.5, iPhone 3.1 with PhoneGap.

Please provide any additional information below.
I found a workaround with that issue, in the touchStart: (line 187) after the 
commented lines (btw: they are here for any reason?), I've put this code:
if(e.target != "[object HTMLSelectElement]"){
 e.preventDefault();
 ...
 this.element.addEventListener(END_EVENT, this, false);
}
Everything works OK with this lines changed.

Original issue reported on code.google.com by egrin...@gmail.com on 12 Jul 2010 at 12:08

GoogleCodeExporter commented 9 years ago

Original comment by mat...@gmail.com on 14 Jul 2010 at 9:37

GoogleCodeExporter commented 9 years ago
Issue 23 has been merged into this issue.

Original comment by mat...@gmail.com on 20 Aug 2010 at 3:41

GoogleCodeExporter commented 9 years ago
This is issue is now at the top of my priority.

Original comment by mat...@gmail.com on 20 Aug 2010 at 3:42

GoogleCodeExporter commented 9 years ago
I spent the weekend on this issue. Unfortunately there's no easy solution. It 
can be done but not in a way that is completely fail safe (ie: you get the 
select working but you loose other features). BTW, I'm working on a new library 
that integrates with iScroll and will let you use form fields aplenty 
(basically rebuilds each form field with a CSS version).

Original comment by mat...@gmail.com on 23 Aug 2010 at 1:44

GoogleCodeExporter commented 9 years ago
Hi, perhaps this would work? At least, it did for me:
http://groups.google.com/group/iscroll/browse_thread/thread/5b2fbad6aa667907

Original comment by jonas.fi...@gmail.com on 8 Dec 2010 at 3:31