| Issue 54: | Sliders and buttons don't work or don't work well in iScroll | |
| 2 people starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1.Create a scrolling element
2.add sliders (any kind mootools,jquerry etc.)
3.or add any kind of touch input (buttons, raios, checkbox)
What is the expected output? What do you see instead?
The input to react to your touch. It doesn't
What version of the product are you using? On what operating system?
4 beta
Please provide any additional information below.
It seams that iScrols blocks the touch events form being interpreted by other elements in the scroll.
I solved the problem by adding a delay in the handleEvent that gives the buttons and the others enough time to get pressed. In my case scroll was a dive since you can't have a range input in Phonegap and i surrounded my div whit and a tag that had href="javascript:null".
handleEvent: function (e) {
//begin modification
if (e.target.tagName == "A")//or DIV UL LI etc any html tag
{setTimeout( function(){for(i=0;i<=1000;i+){}},250);
//I haven't fine tuned the delay so be my guest to try lower values
}
//end modification
var that = this;
switch (e.type)
...
Mar 27, 2011
#1
obog...@gmail.com
Mar 28, 2011
later found a preaty weird sollution that enable scrolling and touching the sliders. Since the sliders are divs I modified the touchStart function in iScroll.js by placing
if (e.target.tagName != "DIV"){
e.preventDefault();
e.stopPropagation();
}
instead of:
e.preventDefault();
e.stopPropagation();
and it works like a charm :|. This is very weird since 98 of the html test file is made out of divs. This should work for all input types.
Cheers
|