Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>OK here's another solution if your <code>textfield</code> whatever HTML element is ain't focusing,scrolling, selecting words, moving text cursor around the text and whatever different scenarios might come then you may override the <strong>jquery.ui.touch.punch.js</strong> script. I assume that your element isn't the draggable one but probably a child of it as my case was.</p> <p>Put a class on your html element, for example <code>class="useDefault"</code>. Then go to the script file and find that part:</p> <pre><code>... function simulateMouseEvent (event, simulatedType) { // Ignore multi-touch events if (event.originalEvent.touches.length &gt; 1) { return; } event.preventDefault(); var touch = event.originalEvent.changedTouches[0], simulatedEvent = document.createEvent('MouseEvents'); .... </code></pre> <p>As you can probably see <code>event.preventDefault();</code> assures that <strong>jquery.ui.touch.punch.js</strong> overrides the default behaviors of the browser. To prevent that for our particular class node, make the following modifications:</p> <pre><code>if (event.originalEvent.touches.length &gt; 1) { return; } var touch = event.originalEvent.changedTouches[0], simulatedEvent = document.createEvent('MouseEvents'); //As you can see here is your class element check if (touch.target.className === "useDefault") { event.stopPropagation(); } else { event.preventDefault(); } </code></pre> <p>This solution is tested with <strong>webkit</strong> browsers only and <strong>jQuery UI Touch Punch 0.2.2</strong> release.</p> <p>Hope that quick solution helps, BR</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload