Questions tagged [touchstart]

158 questions
4
votes
0 answers

How to fix [Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot

I want to handle 'touchstart' event for my mobile site. It worked fine, but now it causes an error in the console. I tested it with my Galaxi S7 Chrome v72.0 browser, and inspected it with chrome://inspect/#devices extension. And when I tried touch…
4
votes
1 answer

Uncaught TypeError: Cannot read property 'pageX' of undefined

I am tinkering with touchevents in js. I have encountered this error in my logcat in eclipse. document.getElementById("squareBracket"). addEventListener("touchmove", touchHandler, false); document.getElementById("squareBracket"). …
Jeongbebs
  • 4,100
  • 7
  • 34
  • 60
4
votes
2 answers

evt.offsetX returns undefined on Safari

I am trying to implement a drag/move action on an SVG element using Javascript. I am using event handlers such as this: function handleMouseDown(evt) { currentX = evt.offsetX; currentY = evt.offsetY; dX = currentX…
Fritz45
  • 752
  • 1
  • 10
  • 23
3
votes
0 answers

Why does Cordova Android app throw this warning: “[Intervention] Ignored attempt to cancel a touchstart event…”?

When running “cordova run android” from the CLI, the Cordova-based app successfully opens and displays on the test phone. However, when touching any part of the screen (whether it’s a UI element or not), the following warning is displayed in the…
mc-sm9
  • 149
  • 1
  • 7
3
votes
1 answer

touchstart and touchend events in ionic 3

I'm looking for a separate event handler in Ionic 3 for starting and ending a touch on an HTML element on a mobile app. I found many related and solved questions, but none for Ionic 3, which currently only seems to support "tap, press, pan, swipe,…
gaspar
  • 898
  • 1
  • 13
  • 26
3
votes
2 answers

Touchstart click event is not working for iPhone / iPade

I've written an event to open new browser tab (window.open) by jQuery like below: $(document).on('touchstart click', '.myClass', {self: this}, function (e) { var mylink = e.data.self.validateDomValue(this, 'attr=data-affiliate') …
MH2K9
  • 11,951
  • 7
  • 32
  • 49
3
votes
0 answers

Handling of 'touchstart' input event was delayed due to main thread being busy?

I am getting this error when i am trying to start my app Handling of 'touchstart' input event was delayed for 2147483647 ms due to main thread being busy. Consider marking event handler as 'passive' to make the page more responsive. Now I know that…
abhit
  • 973
  • 3
  • 17
  • 40
3
votes
0 answers

touchmove event not firing in phonegap app on chrome

I have been struggling with this for a few days now and while there are several related questions on this site, none of them have pinpointed the answer to me. My goal is to implement drawing on a canvas while in a phonegap application. My…
Dallas Caley
  • 5,367
  • 6
  • 40
  • 69
3
votes
0 answers

Javascript TouchMove Delay before event trigger

I'm trying to get constant coordinates of where my touch is, unfortunately when I run application I noticed there is a pixel threshold or something that needs to be surpassed before 'touchmove' is activated. Is there a way to change this threshold?…
JimmyBDB
  • 33
  • 5
3
votes
1 answer

IOS Safari window open on touchstart or touchend

This code is working in most android/chrome mobile browsers: document.body.addEventListener('touchend', function (e) { //alert(1); window.open("http://test.com"); }, false) But it is not working in iOS/Safari (tested with iPhone OS 9_2,…
3
votes
1 answer

preventDefault on touchstart without preventing scrolling

There are similar questions to this one, but the solutions either involve another library or using a click event instead - I wondered if it was feasible to achieve without a library. I'm using a touchstart event on an image to detect a tap of 1.5s,…
George
  • 782
  • 1
  • 9
  • 19
3
votes
1 answer

How to distinguish click and touch events in Internet Explorer 10 / Windows Phone 8

I'm working on a project with a hover navigation. Due to the nature of touch enabled devices, hover isn't really supported on them. For iOS and android I managed to disable all hover effects and simulate them through the "touchstart" event, which…
3
votes
1 answer

Touch events in Android WebView

I'm trying to make a WebView app in Android using the HTML5 canvas and touch. Here's what I think is the relevant part of my code : In onCreate : WebView myWebView = (WebView) findViewById(R.id.webview); WebSettings webSettings =…
interstar
  • 26,048
  • 36
  • 112
  • 180
2
votes
3 answers

not taking color from style attr. or stylesheet on iPad

I have a problem that is and has been perplexing me for hours. I have the following html:
+44 (0)845 519 7811
+44 (0)118 947 4888
I have applied the following CSS: #numbers span { color:#CCC; } I've…
David Barker
  • 14,484
  • 3
  • 48
  • 77
1
2
3
10 11