r86963 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86962‎ | r86963 | r86964 >
Date:18:18, 26 April 2011
Author:krinkle
Status:ok (Comments)
Tags:
Comment:
* Fix ancient jumpy bug when clicking the hover-triangle (normally nobody does that, but just tried it for screenreader thing, it's been around for quite some time (href="#": needs preventDefault)
* jQuery chaining :)
* Add bugzilla ref. in comment ("hidden link being clicked")
(Follow-up r86958, r86861)
Modified paths:
  • /trunk/phase3/skins/vector/vector.js (modified) (history)

Diff [purge]

Index: trunk/phase3/skins/vector/vector.js
@@ -3,17 +3,17 @@
44 */
55 jQuery( function( $ ) {
66 var $pCactions = $( '#p-cactions' );
7 - // For accessibility, show the menu when the hidden link in the menu is clicked
8 - $pCactions.find( 'h5 a' ).click( function() {
9 - $pCactions.find( '.menu' ).toggleClass( 'menuForceShow' );
10 - });
11 -
12 - // When the hidden link has focus, also set a class that will change the arrow icon
13 - $pCactions.find( 'h5 a' ).focus( function () {
14 - $pCactions.addClass( 'vectorMenuFocus' );
15 - });
16 -
17 - $pCactions.find( 'h5 a' ).blur( function () {
18 - $pCactions.removeClass( 'vectorMenuFocus' );
19 - });
 7+ $pCactions.find( 'h5 a' )
 8+ // For accessibility, show the menu when the hidden link in the menu is clicked (bug 24298)
 9+ .click( function( e ) {
 10+ $pCactions.find( '.menu' ).toggleClass( 'menuForceShow' );
 11+ e.preventDefault();
 12+ })
 13+ // When the hidden link has focus, also set a class that will change the arrow icon
 14+ .focus( function() {
 15+ $pCactions.addClass( 'vectorMenuFocus' );
 16+ })
 17+ .blur( function() {
 18+ $pCactions.removeClass( 'vectorMenuFocus' );
 19+ });
2020 });

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86861(bug 24298) Make dropdown menus in Vector more accessible by expanding and co...catrope14:08, 25 April 2011
r86958Selectors go from right to left. Starting with a generic 'a' is kind of slow....krinkle18:01, 26 April 2011

Comments

#Comment by Krinkle (talk | contribs)   15:57, 28 May 2011

Status & tagging log