mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-25 06:46:26 +00:00
Made buttons not change focus
This commit is contained in:
parent
7c7583fcd6
commit
bc13cf2588
|
@ -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 );
|
||||
}
|
||||
}
|
||||
} );
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue