From: Alan Knowles Date: Fri, 16 May 2014 04:48:11 +0000 (+0800) Subject: Roo/bootstrap/Button.js X-Git-Url: http://git.roojs.org/?p=roojs1;a=commitdiff_plain;h=a6e5829a0da2646d404c01b2fd09f61931b6e0d2 Roo/bootstrap/Button.js --- diff --git a/Roo/bootstrap/Button.js b/Roo/bootstrap/Button.js index 947290808c..4942c9b2c9 100644 --- a/Roo/bootstrap/Button.js +++ b/Roo/bootstrap/Button.js @@ -272,6 +272,12 @@ Roo.extend(Roo.bootstrap.Button, Roo.bootstrap.Component, { if(this.preventDefault){ e.preventDefault(); } + if (this.pressed === true || this.pressed === false) { + this.pressed = !this.pressed; + this[this.pressed ? 'addClass' : 'removeClass']('active'); + this.fireEvent('toggle', this,e); + } + this.fireEvent('click', this, e); }