alexblack / google-fastbutton

Implementation of Google's FastButton javascript and jQuery and XUI.js integration
167 stars 46 forks source link

TouchStart propagation prevention breaks Swiper w/ nested buttons. #6

Open lpender opened 10 years ago

lpender commented 10 years ago

Hi all,

Love your work thus far.

I've been independently using FastButton for a few months now on a responsive website I'm developing.

I use iDangerous swiper and often put FastButtons inside of the Swiper.

However, as you can imagine, Line 61 blocks the Swiping functionality.

60    this.FastButton.prototype.onTouchStart = function(event) {
61        event.stopPropagation ? event.stopPropagation() : (event.cancelBubble=true); 
62        this.touchEvents.push(addListener(this.element, 'touchend', this, this.useCapture));

I've been using Fastbutton for months with Line 61 commented, without any issues whatsoever...

So the big question: Is there a good argument for preventing the touchstart from propagating? Should it become an option? Could it perhaps be removed altogether?

Yours true -Lee