r104809 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104808‎ | r104809 | r104810 >
Date:00:28, 1 December 2011
Author:tparscal
Status:deferred
Tags:
Comment:
Made buttons not change focus
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/tools/es.ButtonTool.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/tools/es.ButtonTool.js
@@ -10,8 +10,18 @@
1111
1212 var _this = this;
1313
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+ }
1626 } );
1727
1828 };

Status & tagging log