Made buttons not change focus

This commit is contained in:
Trevor Parscal 2011-12-01 00:28:09 +00:00
parent 7c7583fcd6
commit bc13cf2588

View file

@ -10,8 +10,18 @@ es.ButtonTool = function( toolbar, name ) {
var _this = this;
this.$.click( function ( e ) {
_this.onClick( e );
this.$.bind( {
'mousedown': function( e ) {
if ( e.button === 0 ) {
e.preventDefault();
return false;
}
},
'mouseup': function ( e ) {
if ( e.button === 0 ) {
_this.onClick( e );
}
}
} );
};