Software Archive
Read-only legacy content
17061 Discussions

jquery.ui.touch-punch.min.js does not work partially on Crosswalk

Hamilton_Tenório_da_
Valued Contributor I
2,135 Views

I am an APP that uses jquery.ui.touch-punch.min.js. Until now, using Android Cordova build it works OK.

Now, I am testing the same APP with Crosswalk build. The function drag is working, but the tap over some area doesn´t.

I tried the debug using a Motorola Xoom, but no erros.

To better undertanding, see the image attached. The area is at bottom part of the screen (sequence of letters). I can move the letters to right and left normally. But if I tap some letter, notthing happens. 

What can be this?

Is there another way to use drag/drop/tap on XDK?

 

0 Kudos
6 Replies
Swati_S_Intel1
Employee
2,135 Views

Are you using jQuery Mobile? If you are then, the tap event should work. http://api.jquerymobile.com/tap/

If you are not, I recommend using some mobile UI framework, that will take care of events like tap and other responsive UI features.

Swati

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
2,135 Views

Yes, I am using JQuery Mobile with jquery.ui.touch-punch.min.js.

In Android build it works well (drag & moviment or tap). In Cordova build only the drag & moviment is working. The tap is not recognized.

I debug the app and no errors is showed. 

The original command that works at Android build is:

$(document).on("click", "[id^=umaLetraPesquisa_]", function () {...}

I tryed to change to 

$("[id^='umaLetraPesquisa_']").bind("tap", funcTap);

But is still no working.

What I need is a area that the user can moviment and choose some letter. It is used to find names starting with some letter. The area contains all letters (A B C D E F ...... Z), but, depending the size of the scrren, some part of this list is out of the visual area. Then the user needs to moviment the area to see on specific letter. The way that I figure this is a drag area. But I accept suggestions...

Thank you!

0 Kudos
Jeferson_S_
Beginner
2,135 Views

Hi Hamilton,

I'am having the same issue using jquery.ui.touch-punch.min.js it does not work in building (Android and Crosswalk). In Emulate it works fine. No erros in debug.

Did you find a solution for this?

Thanks.

0 Kudos
Hamilton_Tenório_da_
Valued Contributor I
2,135 Views

No. I changed my original idea. I created 2 arrows (left and right) to be used by the user to shift the letters of my box.

0 Kudos
Jeferson_S_
Beginner
2,135 Views

Thanks for the feedback Hamilton.

I think I will need to find an alternative also, as this doesn't seem to have a solution.

Regards.

0 Kudos
Jeferson_S_
Beginner
2,135 Views

For those who may have interest, I was able to find an alternative solution, by adding after the regular slider:

    $('#vslider').bind('touchstart touchmove', function(e) {
        e.preventDefault(); // prevent the default action!
        var yPos = event.touches[0].pageY;
        $('#vslider').slider('option', 'value', yPos);
    });

 

0 Kudos
Reply