Index: trunk/phase3/skins/vector/vector.js |
— | — | @@ -2,35 +2,20 @@ |
3 | 3 | * Vector-specific scripts |
4 | 4 | */ |
5 | 5 | jQuery( function( $ ) { |
6 | | - |
7 | | - // For accessibility, show the menu whe |
8 | | - // the hidden link in the menu is focused (bug 24298) |
9 | 6 | $( 'div.vectorMenu' ).each( function() { |
10 | 7 | var self = this; |
11 | | - var focused = false; |
12 | 8 | $( 'h5:first a:first', this ) |
| 9 | + // For accessibility, show the menu when the hidden link in the menu is clicked (bug 24298) |
13 | 10 | .click( function( e ) { |
| 11 | + $( '.menu:first', self ).toggleClass( 'menuForceShow' ); |
14 | 12 | e.preventDefault(); |
15 | | - } ) |
16 | | - // Blur the link if it was focused before the click |
17 | | - .mousedown( function( e ) { |
18 | | - focused = $( this ).is( ':focus' ); |
19 | | - } ) |
20 | | - .mouseup( function( e ) { |
21 | | - if ( focused ) { |
22 | | - $( this ).blur(); |
23 | | - } |
24 | | - e.preventDefault(); |
25 | | - } ) |
26 | | - // When the hidden link has focus, show the menu |
27 | | - // and set a class that will change the arrow icon |
| 13 | + }) |
| 14 | + // When the hidden link has focus, also set a class that will change the arrow icon |
28 | 15 | .focus( function() { |
29 | | - $( '.menu:first', self ).addClass( 'menuForceShow' ); |
30 | 16 | $( self ).addClass( 'vectorMenuFocus' ); |
31 | | - } ) |
| 17 | + }) |
32 | 18 | .blur( function() { |
33 | | - $( '.menu:first', self ).removeClass( 'menuForceShow' ); |
34 | 19 | $( self ).removeClass( 'vectorMenuFocus' ); |
35 | | - } ); |
36 | | - } ); |
| 20 | + }); |
| 21 | + }); |
37 | 22 | }); |