r62256 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62255‎ | r62256 | r62257 >
Date:19:14, 10 February 2010
Author:catrope
Status:ok
Tags:
Comment:
UsabilityInitiative: Fix tabbing fix, duplicate tabindexes were throwing it off
Modified paths:
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js (modified) (history)
  • /trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UsabilityInitiative/js/plugins/jquery.wikiEditor.js
@@ -310,7 +310,7 @@
311311 return true;
312312 } else {
313313 var $tabindexList = $j( '[tabindex]:visible' ).sort( function( a, b ) {
314 - return a.tabIndex > b.tabIndex ? 1 : -1;
 314+ return a.tabIndex - b.tabIndex;
315315 } );
316316 for( var i=0; i < $tabindexList.length; i++ ) {
317317 if( $tabindexList.eq( i ).attr('id') == context.$iframe.attr( 'id' ) ) {
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.js
@@ -6743,7 +6743,7 @@
67446744 return true;
67456745 } else {
67466746 var $tabindexList = $j( '[tabindex]:visible' ).sort( function( a, b ) {
6747 - return a.tabIndex > b.tabIndex ? 1 : -1;
 6747+ return a.tabIndex - b.tabIndex;
67486748 } );
67496749 for( var i=0; i < $tabindexList.length; i++ ) {
67506750 if( $tabindexList.eq( i ).attr('id') == context.$iframe.attr( 'id' ) ) {
Index: trunk/extensions/UsabilityInitiative/js/plugins.combined.min.js
@@ -447,7 +447,7 @@
448448 if('fn'in $.wikiEditor.modules[module]&&'create'in $.wikiEditor.modules[module].fn){context.modules[module]={};$.wikiEditor.modules[module].fn.create(context,modules[module]);}}}}};context.evt={'keydown':function(event){switch(event.which){case 90:if((event.ctrlKey||event.metaKey)&&context.history.length){if(event.shiftKey){context.historyPosition++;}else{context.historyPosition--;}
449449 if(context.history.length+context.historyPosition>=0&&context.historyPosition<0){context.$content.html(context.history[context.history.length+context.historyPosition].html);}else{context.historyPosition=Math.max(-context.history.length,Math.min(context.historyPosition,-1));}
450450 return false;}
451 -break;case 9:if(event.ctrlKey||event.altKey||event.shiftKey){return true;}else{var $tabindexList=$j('[tabindex]:visible').sort(function(a,b){return a.tabIndex>b.tabIndex?1:-1;});for(var i=0;i<$tabindexList.length;i++){if($tabindexList.eq(i).attr('id')==context.$iframe.attr('id')){$tabindexList.get(i+1).focus();break;}}
 451+break;case 9:if(event.ctrlKey||event.altKey||event.shiftKey){return true;}else{var $tabindexList=$j('[tabindex]:visible').sort(function(a,b){return a.tabIndex-b.tabIndex;});for(var i=0;i<$tabindexList.length;i++){if($tabindexList.eq(i).attr('id')==context.$iframe.attr('id')){$tabindexList.get(i+1).focus();break;}}
452452 return false;}
453453 break;case 86:if(event.ctrlKey){context.evt.paste(event);}
454454 break;}

Follow-up revisions

RevisionCommit summaryAuthorDate
r62257wmf-deployment: Merge r62256 (tabindex fix for UsabilityInitiative) from trunkcatrope19:19, 10 February 2010

Status & tagging log