pukhalski / tap

1Kb library for easy unified handling of user interactions such as mouse, touch and pointer events.
https://github.com/pukhalski/tap/archive/master.zip
MIT License
527 stars 45 forks source link

PreventDefault() and return false event methods not respected on Android 4.3 stock browser #38

Open qikkeronline opened 9 years ago

qikkeronline commented 9 years ago

Hi @pukhalski - when doing some tests on one of the sites that I'm using tap on, I found an issue regarding the preventDefault() and return false event methods. They do not seem to be respected on the Android 4.3 stock browser; but other JS logic I'm writing in the .on('tap') function calls does get executed.

I don't have the device with me; but I will drop the specifics about the OS and browser version here. Will do some debugging tomorrow. An example from my code:

// Toggling the menu on click
var menu_toggle_trigger = '.js-header__toggle_menu';
var menu_nav = jQuery('.js-header');

jQuery(document).on('tap', menu_toggle_trigger, function(e) {

    menu_nav.toggleClass('js-header--nav_open');

    ToggleMenu();
    return false;

});