The code looks something like this:
$( ".greyHeart" ).bind( "tap", function( event ){ $(this.parentNode).addClass('favourited'); $(this.parentNode).removeClass('notFavourited'); //store data in array in local storage }); $( ".redHeart" ).bind( "tap", function( event ){ $(this.parentNode).addClass('notFavourited'); $(this.parentNode).removeClass('favourited'); //remove data from array in local storage });
This all works brilliantly across my desktop browsers, iOS and most Androids. Except 4.4.2.
In 4.4.2 it seems that the tap event is detected on the grey heart and then again the tap event is detected on the red heart too when it appears under the user's finger. The user sees the heart turn red then immediately grey again.
To get around this odd behaviour I had to change my code to immediately unbind tap events on detecting a tap, and then rebind them after a small delay.
No comments:
Post a Comment
Comments are moderated, so you'll have to wait a little bit before they appear!