Remove old selectors and JavaScript for dropdown menus

Bug: T168080
Change-Id: I49006314d42a00818464a94412cb63190b59a99b
This commit is contained in:
Bartosz Dziewoński 2017-06-16 19:12:08 +02:00 committed by Krinkle
parent 5db0c43a45
commit 0ee8510ce7
2 changed files with 2 additions and 23 deletions

View file

@ -167,8 +167,7 @@ div.vectorMenu h3 {
}
}
div.vectorMenu .vectorMenuCheckbox:checked + h3 span:after,
div.vectorMenu.menuForceShow h3 span:after {
div.vectorMenu .vectorMenuCheckbox:checked + h3 span:after {
transform: scaleY( -1 );
}
@ -195,8 +194,7 @@ div.vectorMenu div.menu {
z-index: 2;
}
div.vectorMenu:hover div.menu,
div.vectorMenu.menuForceShow div.menu {
div.vectorMenu:hover div.menu {
display: block;
}
// This is in a separate block, so that browsers supporting :hover but not :checked still apply the rule above

View file

@ -25,25 +25,6 @@ jQuery( function ( $ ) {
*/
$( '#searchInput' ).attr( 'tabindex', $( document ).lastTabIndex() + 1 );
/**
* Dropdown menu accessibility
*/
$( 'div.vectorMenu' ).each( function () {
var $el = $( this );
if ( $el.find( '.vectorMenuCheckbox' ).length ) {
return;
}
$el.find( '> h3 > span' ).parent()
.attr( 'tabindex', '0' )
// For accessibility, show the menu when the h3 is clicked (bug 24298/46486)
.on( 'click keypress', function ( e ) {
if ( e.type === 'click' || e.which === 13 ) {
$el.toggleClass( 'menuForceShow' );
e.preventDefault();
}
} );
} );
// Bind callback functions to animate our drop down menu in and out
// and then call the collapsibleTabs function on the menu
$tabContainer