ftlabs / fastclick

Polyfill to remove click delays on browsers with touch UIs
MIT License
18.66k stars 3.23k forks source link

Fastclick with bind .on jquery #118

Open guilhermemmb opened 11 years ago

guilhermemmb commented 11 years ago

Hello guys,

im trying to use fastclick with jquery mobile in my project.

i binded that element like a example :

$(document).on
            (
                "click",
                phonogram.list.cssClass,
                function(event, ui)
                {   
                    var element = $(this);
                    if(phonogram.options.visible != undefined)
                    {
                        phonogram.options.visible.slideUp({duration: "fast",easing: 'linear'});
                        phonogram.options.visible = undefined;
                    }
                    if(element.next().is(":hidden"))
                    {
                        phonogram.options.visible = element.next();
                        phonogram.options.visible.slideDown
                        (
                            "fast",
                            function()
                            {
                                var $this = $(this);
                                $this.scrollIntoView();
                            }
                        );
                    }
                }
            );

The problem is : when i use scrollup or scrolldown with fastclick lib , my hidden div blinks before its scrolled normally. Because of that, i need to prevent fastclick act in this scenario.

I tried to use 'needsclick' to specific element but my needsclick was ignored by fastclick lib.

Have i another behavior to avoid fastclick in this scenario?

sry my poor english. If u need any another information to solve my problem, , I will be available.

thx alot.

matthew-andrews commented 10 years ago

Apologies in the delay in getting back to you. If you're still experiencing this issue would you be able to provide a reduced test case that shows the unexpected blinking?