X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=Roo%2Fbootstrap%2FButton.js;h=4942c9b2c9e5f37dabc010b75d278349d37eefac;hb=a6e5829a0da2646d404c01b2fd09f61931b6e0d2;hp=947290808c99a2e0d81d13a0dd152ad3bbc5eb79;hpb=19bdce66b59fb12a662dab7e70d29d8cb6339ee7;p=roojs1 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); }