QuoJS icon indicating copy to clipboard operation
QuoJS copied to clipboard

preventDefault on tap events

Open massimocolella opened this issue 11 years ago • 1 comments

hi, trying to understand:

        $$('a.add_fav').on('touchstart', function(e) {
            e.preventDefault();
            mycodehere();
        });

seems to correctly prevent link to be executed, while

        $$('a.add_fav').tap(function(e) {
            e.preventDefault();
            mycodehere();
        });

does take the browser to the a href attribute. tested on safari IOS 6.x, iphone 4. is it right? more in general, which method should be used with quojs to prevent "a" links to be executed? thanks in advance, you did really a great job with quojs.

massimocolella avatar Jun 28 '13 10:06 massimocolella

e.stopImmediatePropagation();

TNT-RoX avatar Nov 08 '13 11:11 TNT-RoX