You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 :
functionactivateHandler(event){/*jshint validthis:true */// Ignore clicks on interactive elements.if(isInteractive(this)){event.stopPropagation();return;}// Accept only events from direct SLIDEE children.if(this.parentNode===$slidee[0]){self.activate(this);}}
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.
<ulclass="items"><liclass="postIt commentaire clearfix panel panel-default"data-parent="#SubMenu1"><divclass="header"><aclass=""aria-controls="collapseOne"aria-expanded="false"href="#collapseOne"data-parent="#accordion"data-toggle="collapse"><spanclass="">Commentaire du 15/12/15</span></a><buttonclass="td noBtnStyle glyphicon right flag small white"title="Marquer comme vu"></button><buttonclass="td noBtnStyle right glyphicon retweet small noBtnStyle white"title="Répondre avec un post-it"data-toggle="modal"data-target="#postItRepondre"></button></div><divid="collapseOne"class="panel-collapse collapse in"aria-labelledby="headingTwo"role="tabpanel"><headerclass="row "><divclass="tr"><span>Réponse attendue pour le <strong>17/12/2015</strong></span></div><divclass="tr"><spanclass="provenance col-md-12">De la part de <ahref="">Berther Benoit</a> à <ahref="">Vincent Gachet</a></span></div></header><articleclass="col-md-12">L'appel d'offre doit être envoyé ce soir. Les imprimantes doivent être impérativement en service le 24 mars 2015 à midi.L'appel d'offre doit être envoyé ce soir. Les imprimantes doivent être impérativement en service le 24 mars 2015 à midi.</article></div></li></ul>
Any way to fix this ?
Thanks!
The text was updated successfully, but these errors were encountered:
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:
functionactivateHandler(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 elementsif(this.parentNode!==$slidee[0]||event.originalEvent[namespace+'ignore'])return;self.activate(this);}
If it works for you I'll release it in next patch.
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!
The text was updated successfully, but these errors were encountered: