Closed tblaisot closed 9 years ago
Yeah that .stopPropagation()
shouldn't be there. That's why those events are not reaching your event handler.
Try replacing the activeHandler()
function with this:
function activateHandler(event) {
/*jshint validthis:true */
// Ignore clicks on interactive elements.
if (isInteractive(this)) {
event.originalEvent[namespace + 'ignore'] = true;
return;
}
// Ignore events that:
// - are not originating from direct SLIDEE children
// - originated from interactive elements
if (this.parentNode !== $slidee[0] || event.originalEvent[namespace + 'ignore']) return;
self.activate(this);
}
If it works for you I'll release it in next patch.
This seems to be working fine. I tried it with or without drag enable and my buttons are working properly now. Thank for the correction!
Hi, Thanks for your awesome library! I have a problem when trying to use a button on an sly item if activateOn is set to click : the button doesn't respond.
After debugging I find this function :
which cause the click event to be dropped on a button because by default buttons are "interactive". If I understand it, this is to prevent to start dragging when clicking on a button ?
Here is a exemple of the "item" code I am using. I use the twitter bootstrap framework to open a popup when clicking on the buttons (with data-toggle data-target) and the handler of bootstrap is never called because the sly one is called before and drop the event.
Any way to fix this ? Thanks!