Open senner007 opened 11 years ago
Hi,
I will refactor all prevent default related stuff for the next release. There are some problems with the current implementation. I have to think about how to do this correctly.
By then, I will soon provide a simple patch to give access to the original event and let the user prevent it if he wants. With the patched version, something like this will solve your problem:
$('#slider').on('drag', function(e) {
if ('vertical' == e.orientation) {
return;
}
e.originalEvent.preventDefault();
// do my stuff...
});
Released a patched version : 79d58e6a818598f1c79f120a0f86cd5f78ef9f94.
This does not seem to wok. I did as above but it does not block vertical scrolling.
Ok. I will dig more deeply to find a satisfying solution for this.
This release makes the code above work : https://github.com/ngryman/jquery.finger/releases/tag/v0.1.0-beta. Here is a live demo : http://jsfiddle.net/ngryman/dfgee/.
It seems to be working now. The only problem is that the event is fired twice. ??? Also, it doesn't seem to work with the 'flick' event
Ok, this is perhaps related to #13.
Could be, although it doesn't seem to be android related. You can see for yourself in the fiddle example you made.
have you fixed this issue?
Whats the status on this?
I found a solution using hammer.js :
$('#container').hammer({drag_block_horizontal: true});
,but then I have to include this library for this funtionality only.