Questions tagged [touchstart]

158 questions
2
votes
3 answers

Get position relative to parent not viewport on mousedown / touchstart

How, on mousedown or touchstart, can I get the position of the mouse relative to or within the container or element it took place in. So, I know I can get the pageX/Y or clientX/Y from the event or on touch, the original event. But that is the…
wordSmith
  • 2,993
  • 8
  • 29
  • 50
2
votes
0 answers

jQuery enable function on touchstart but not with touchmove event

I have a responsive dropdown menu that only opens on touch or click then closes when clicking or touching anywhere outside the menu. problem occurs if mobile user simply wants to swipe further down the page, as soon as they touch to scroll, the…
MilkyTech
  • 1,919
  • 2
  • 15
  • 39
2
votes
1 answer

Can't scroll anymore on touchstart

I want to add touchstart event on my li without disabling scroll on the parent. Currently, it works. I have the scroll on timeline and I can click on li. When I add touchstart, I can click one of the li, it's better than click on a mobile. But the…
Steffi
  • 6,835
  • 25
  • 78
  • 123
2
votes
1 answer

touchstart handler messes up focus of a text input when wrapped in an iframe

I'm working on a phonegap app that uses an iframe to embed an already mobile friendly webapp. In the webapp there is a search function that focuses a text field which reveals the virtual keyboard. So far everything is good... However, I'm using a…
aharbick
  • 21
  • 4
2
votes
3 answers

prevent touchstart when page scrolling on mobile

I would like to disable the touchstart event when a user scrolls down the page of their mobile device. The page has various elements which when you click toggles a class but I want thos touchstart event diabled when the user swipes down to scroll…
user1937021
  • 10,151
  • 22
  • 81
  • 143
2
votes
1 answer

Trying to make jQuery Mobile elements highlight onTouchStart

I have a jQuery mobile list. I'd like to make the list elements highlight when the user touches them. I tried to implement this using: $("#id").bind('touchstart tap', function () { $("#id").css('background', 'blue'); …
Ben Pearce
  • 6,884
  • 18
  • 70
  • 127
2
votes
2 answers

Android HTML5 touchstart screen delay

I'm writing an HTML5 game which updates the canvas on touchstart. On my Galaxy Note 10.1 running Android 4.1.1, the screen takes a little while to update after the touchstart event. I investigated and concluded that the screen (just any change in…
2
votes
1 answer

how to use touchmove to complement mousemove for androids

What difences should i be aware of when tring to complement a working function that use mouse move in to also work on smartphones. So far have i learned that on my android i get touchmove insted of mousemove, touchstart insted of…
Puggan Se
  • 5,738
  • 2
  • 22
  • 48
2
votes
1 answer

Extremely slow performance of element.addEventListener("touchstart")

On Chrome something is seriously wrong with the performance of element.addEventListener("touchstart") in my system, in some cases reaching 100ms for a single call. r00122 listen touchstart: 60.000ms r00123 listen touchstart: 61.000ms r00124 listen…
user663031
2
votes
1 answer

Kinetic JS touchstart/touchend confusion on ipad

I am having trouble being able to debug this issue: If you check out this jfiddle on the iPad, you'll see you can click on each circle to change the content above. When you hold on one circle you will see it turn green (image…
RooWM
  • 583
  • 9
  • 23
2
votes
2 answers

touchstart and touchend to simulate hover or mouseup and mousedown

I need to simulate hover or mouseup/down in iphone menu, there are two examples I have given.
samuk
  • 157
  • 1
  • 3
  • 19
2
votes
1 answer

jqplot tooltip display on touch instead of jqplotDataHighlight or higlightMouseOver or highlightMouseDown

I am using the jqplotDataHighlight option to display the tooltip on a chart on MouseOver. $("#"+sTargetId).bind('jqplotcustomDataHighlight', function (ev, seriesIndex, pointIndex, data) { var…
user930514
  • 917
  • 2
  • 16
  • 28
2
votes
1 answer

iOS Safari: touchstart doesn't fire on dynamically inserted element

I'm working on an web app for iOS Safari. I've got a search input with an autocompletion/suggestions list below it. With javascript I add the suggestions to the list: document.getElementById('selector_autocomplete').innerHTML += '
seymar
  • 3,993
  • 6
  • 25
  • 30
2
votes
0 answers

click and hold to scroll, touchstart, touchmove, touchend

I have a scrollable div. I want people to be able to scroll the list through 'hold', and also select a button for click. The problem is that when a button is held in order to scroll the div, it is triggering the click function. I want that do not…
LGVentura
  • 1,547
  • 1
  • 11
  • 17
1
vote
1 answer

Bind 'touchstart' event in jQuery not working with android phonegap and backbone

I have the following template in Backbone, all gets rendered perfectly.
mabounassif
  • 2,311
  • 6
  • 29
  • 46