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…
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:
Cyrille
  • 25,014
  • 12
  • 67
  • 90
6
votes
1 answer

Ionic 4 - click vs touchstart on tablets (problems with click / move configuration)

We develop an Ionic 4 app that is installed in POS (point of sales) on an android tablet. Problem is, that events often get not recognised because the user stands in front of the tablet which is quite low and…
chris08002
  • 487
  • 5
  • 15
5
votes
1 answer

Using touch events in cordova windos app

I am creating an application for windows using cordova that heavily relies on touch events such as touchstart and touchmove. These events work fine in the android and iOS version but they are not fired in the windows version. Instead the browser…
5
votes
1 answer

Why does Android click area have a wider radius than touchstart? How can I make it consistent?

I have a simple rectangular anchor tag. I used jQuery to respond to click and touchstart events with the following: $(document).ready(function() { $("#button").on("click touchstart", function(e) { $("#log").append(e.type +…
tmsimont
  • 2,651
  • 2
  • 25
  • 36
1
2 3
10 11