Touchmove & vmousover does not work in Cordova / PhoneGap app for Android

I tried both methods in this answer to get “drag and drop touch selection” over the elements of my PhoneGap application (tested on Android).

Here is my JSFiddle approach for touch navigation

  $("td").bind("touchmove", function(evt){
     var touch = evt.originalEvent.touches[0]
     highlightHoveredObject(touch.clientX, touch.clientY);
  });

Here is my JSFiddle for vmousemove approach

   $("#main").bind("vmousemove", function(evt){
      $('.catch').each(function(index) {
         if ( div_overlap($(this), evt.pageX, evt.pageY) ) {
            $('.catch').not('eq('+index+')').removeClass('green');
            if (!$(this).hasClass('green')) {
               $(this).addClass('green');
            }
         }
      });
  });

Both work great when emulating an application from a desktop browser. Both work when viewing JSFiddles from my Android tablet browser. But in the installed application on the tablet, this does not work. Instead of highlighting the update when I drag the items, all I get is the main event on the first-touch event. The same goes for both methods.

Any ideas what is going on?

: " android, touchmove, , . Don , ...". , , " touchmove " ?

, - "" PhoneGap ?

+4

Source: https://habr.com/ru/post/1528861/


All Articles