From a6e5829a0da2646d404c01b2fd09f61931b6e0d2 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Fri, 16 May 2014 12:48:11 +0800 Subject: [PATCH] Roo/bootstrap/Button.js --- Roo/bootstrap/Button.js | 6 ++++++ 1 file changed, 6 insertions(+) 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); } -- 2.39.2