Note that there are some explanatory texts on larger screens.

plurals
  1. POPhonegap on Galaxy S3 ignores touch events
    primarykey
    data
    text
    <p>I am having a really odd issue. I have a Phonegap 2.0 app that is basically completed. It is working on iPhone and iPad and I ported it over to Android in a day, testing it on my Galaxy S. Everything worked perfectly. Then I tried to run it on my brand new S3 and none of the touch events worked. Clicks work, but not touch.</p> <p>If I run this code</p> <pre><code>document.addEventListener('touchstart', function (e) { console.log('touch start')}, false); document.addEventListener('click', function (e) { console.log('doc click'); }, false); </code></pre> <p>... only the click events logs. If I comment out the click I get nothing but the system clicks.</p> <pre><code>10-12 10:08:16.213: V/webview(2805): NO_FAST_DRAW = false 10-12 10:08:16.283: V/webview(2805): singleCursorHandlerTouchEvent -getEditableSupport FASLE </code></pre> <p>The really weird thing is that the same touchstart works both on the S3 browser AND the PhoneGap ChildBrowser plugin. Just not in the webview portion of the app, and only on the S3.</p> <p>[UPDATED]</p> <p>And it gets weirder. If I bind the event in the inline JavaScript code, such as this</p> <pre><code>// Javascript stuff document.addEventListener('touchstart', function (e) { alert('touch start')}, false); // more JavaScript stuff </code></pre> <p>it actually works. However, if I set it after a timeout it doesn't</p> <pre><code>setTimeout(function() { document.addEventListener('touchstart', function (e) { alert('touch start')}, false); }, 2000); </code></pre>
    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.
 

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