From e22f2272c26122e645931e96d476eff21bcb8ec5 Mon Sep 17 00:00:00 2001 From: Krinkle Date: Tue, 26 Apr 2011 18:18:29 +0000 Subject: [PATCH] * 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) --- skins/vector/vector.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/skins/vector/vector.js b/skins/vector/vector.js index b4c14c76d2..757f7c8c99 100644 --- a/skins/vector/vector.js +++ b/skins/vector/vector.js @@ -3,17 +3,17 @@ */ jQuery( function( $ ) { var $pCactions = $( '#p-cactions' ); - // For accessibility, show the menu when the hidden link in the menu is clicked - $pCactions.find( 'h5 a' ).click( function() { - $pCactions.find( '.menu' ).toggleClass( 'menuForceShow' ); - }); - - // When the hidden link has focus, also set a class that will change the arrow icon - $pCactions.find( 'h5 a' ).focus( function () { - $pCactions.addClass( 'vectorMenuFocus' ); - }); - - $pCactions.find( 'h5 a' ).blur( function () { - $pCactions.removeClass( 'vectorMenuFocus' ); - }); + $pCactions.find( 'h5 a' ) + // For accessibility, show the menu when the hidden link in the menu is clicked (bug 24298) + .click( function( e ) { + $pCactions.find( '.menu' ).toggleClass( 'menuForceShow' ); + e.preventDefault(); + }) + // When the hidden link has focus, also set a class that will change the arrow icon + .focus( function() { + $pCactions.addClass( 'vectorMenuFocus' ); + }) + .blur( function() { + $pCactions.removeClass( 'vectorMenuFocus' ); + }); }); -- 2.20.1