Questions tagged [touchstart]
158 questions
216
votes
37 answers
How to bind 'touchstart' and 'click' events but not respond to both?
I'm working on a mobile web site that has to work on a variety of devices. The ones giving me a headache at the moment are BlackBerry.
We need to support both keyboard clicks as well as touch events.
Ideally I'd just…

DA.
- 39,848
- 49
- 150
- 213
38
votes
1 answer
On Windows Phone's IE Touchstart Event Ends Automatically After Few Seconds
I have a very specific problem. I'm writing a web-page for mobile phones which has a button on it. I'm detecting touchevent on every browser including IE, but on IE it's quite specific. After a few seconds it automatically ends. Can you somehow help…

gogachinchaladze
- 1,064
- 1
- 8
- 19
19
votes
7 answers
Determine touch position on tablets with JavaScript
I have an object with the name "element". If somebody touches the tablet, I would like to return the x and y coordinates of the touch position relative to the object, i. e. the upper left corner of the object has the coordinates x=0 and y=0.
I know…

Tall83
- 343
- 1
- 4
- 8
16
votes
3 answers
ng-touchstart and ng-touchend in Angularjs
I have an element which fires functions on ng-mousedown and ng-mouseup. However, It doesn't work on touch screen, is there any directive like ng-touchstart and ng-touchend?

ciembor
- 7,189
- 13
- 59
- 100
11
votes
1 answer
touchstart event does not trigger on scrollable div if already scrolling (on iPhone)
I have met this problem when scrolling on my iPhone 6 device (tested on Safari and Chrome):
Given a scrollable div, if i touch the div when it's already on inertial scrolling motion, the scrolling motion stops as expected but the touchstart event…

Oscar Galo
- 339
- 2
- 12
10
votes
3 answers
How to replace click with touchstart on iOS devices
Objective
To close the parent div of an anchor tag when clicked. In the code below, I want to hide div performance_tt when the user clicks on anchor tag close_performance_tt.
Problem
Unable to get it to work on iOS devices after spending several…

KalC
- 1,530
- 3
- 22
- 33
9
votes
5 answers
Android browser garbles events for two taps in quick succession
I'm trying to use JavaScript and jQuery to capture touch events. But I'm seeing some very odd behavior in the Web browser on Android 2.3.2: whenever I tap the screen, and then quickly tap somewhere else on the screen, the browser:
momentarily shows…

Joe White
- 94,807
- 60
- 220
- 330
9
votes
1 answer
jquery touchstart not working on document
a simple touchstart event will work, if you use this syntax:
http://jsfiddle.net/rwdu4hb9/
$(function(){
$('.test').on('touchstart', function(){
alert("Clicked");
});
});
But if you want to add your event for all coming elements…

user3631654
- 1,735
- 6
- 22
- 38
8
votes
3 answers
How can I catch touchmove events on an element that is added to the DOM after my finger is already on the screen?
I am working on a Javascript / html5 project for iPad.
I need to be able to catch touchmove events on an element that does not get added to the DOM until after a touchstart event has fired (i.e. until after a person has put their finger on the…

user1031947
- 6,294
- 16
- 55
- 88
7
votes
2 answers
Android - JavaScript : touchstart event not fired until zoom or scroll the page
In my Android application, The user can browse some HTML pages using ViewPager, and the user can touch an element to highlight.
the problem is when trying to get the touch event using javascript using the following code, elementFromPoint returns…

Ahmed Al Khashab
- 373
- 1
- 9
- 19
6
votes
3 answers
using touchstart causes screen to become fuzzy on touchstart
I am currently testing touchstart functionality on my device (Samsung galaxy S2) for my game. I am programming using javascript and jquery wrapped under phonegap in android and currently having issues as follows:
my touch start event (e.g…

Zen Pak
- 578
- 6
- 22
6
votes
1 answer
jQuery events on iOS 5
I'm having an issue with jQuery 1.6.4, iOS 5 and the registration of touchstart/touchend events (as stated in the title, obviously).
Take the following code: