r58448 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r58447‎ | r58448 | r58449 >
Date:22:45, 2 November 2009
Author:tparscal
Status:ok (Comments)
Tags:
Comment:
Fixes regression in r57836 which changed the event from click to mousedown - but cause left and right clicks to activate the control. Now, we just filter out all clicks that are not the primary button.
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.toolbar.js
@@ -456,7 +456,11 @@
457457 .attr( 'href', '#' )
458458 .text( $.wikiEditor.autoMsg( section, 'label' ) )
459459 .data( 'context', context )
460 - .bind( 'mousedown', function() {
 460+ .bind( 'mousedown', function( e ) {
 461+ // Only act when the primary mouse button was pressed
 462+ if ( e.button !== 0 ) {
 463+ return true;
 464+ }
461465 var $sections = $(this).data( 'context' ).$ui.find( '.sections' );
462466 var $section =
463467 $(this).data( 'context' ).$ui.find( '.section-' + $(this).parent().attr( 'rel' ) );

Follow-up revisions

RevisionCommit summaryAuthorDate
r58449Added a handler to unfocus the tab on mouseup - since the focus happens after...tparscal22:53, 2 November 2009
r59204wmf-deployment: Merging usability changes from trunk...catrope18:53, 18 November 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r57836Changed click handlers to mousedown - improves precieved performance.tparscal23:46, 16 October 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   22:51, 2 November 2009

needs updated minified code

Status & tagging log