Index: trunk/extensions/VisualEditor/modules/es/tools/es.ButtonTool.js |
— | — | @@ -10,8 +10,18 @@ |
11 | 11 |
|
12 | 12 | var _this = this;
|
13 | 13 |
|
14 | | - this.$.click( function ( e ) {
|
15 | | - _this.onClick( e );
|
| 14 | + this.$.bind( {
|
| 15 | + 'mousedown': function( e ) {
|
| 16 | + if ( e.button === 0 ) {
|
| 17 | + e.preventDefault();
|
| 18 | + return false;
|
| 19 | + }
|
| 20 | + },
|
| 21 | + 'mouseup': function ( e ) {
|
| 22 | + if ( e.button === 0 ) {
|
| 23 | + _this.onClick( e );
|
| 24 | + }
|
| 25 | + }
|
16 | 26 | } );
|
17 | 27 |
|
18 | 28 | };
|