diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js index 24dca37ffa..08fb3921b5 100644 --- a/wp-admin/js/common.js +++ b/wp-admin/js/common.js @@ -236,7 +236,6 @@ showNotice = { adminMenu = { init : function() { - $('#adminmenu a').attr('tabindex', '10'); $('#adminmenu div.wp-menu-toggle').each( function() { if ( $(this).siblings('.wp-submenu').length ) $(this).click(function(){ adminMenu.toggle( $(this).siblings('.wp-submenu') ); }); diff --git a/wp-admin/menu-header.php b/wp-admin/menu-header.php index 5321a32b55..dc9935bef6 100644 --- a/wp-admin/menu-header.php +++ b/wp-admin/menu-header.php @@ -56,6 +56,7 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { $class[] = $item[4]; $class = $class ? ' class="' . join( ' ', $class ) . '"' : ''; + $tabindex = ' tabindex="1"'; $id = isset($item[5]) && ! empty($item[5]) ? ' id="' . $item[5] . '"' : ''; $img = ''; if ( isset($item[6]) && ! empty($item[6]) ) { @@ -75,17 +76,17 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { $menu_hook = get_plugin_page_hook($submenu[$item[2]][0][2], $item[2]); if ( file_exists(WP_PLUGIN_DIR . "/{$submenu[$item[2]][0][2]}") || !empty($menu_hook)) { $admin_is_parent = true; - echo "$img$toggle{$item[0]}"; + echo "$img$toggle{$item[0]}"; } else { - echo "\n\t$img$toggle{$item[0]}"; + echo "\n\t$img$toggle{$item[0]}"; } } else if ( current_user_can($item[1]) ) { $menu_hook = get_plugin_page_hook($item[2], 'admin.php'); if ( file_exists(WP_PLUGIN_DIR . "/{$item[2]}") || !empty($menu_hook) ) { $admin_is_parent = true; - echo "\n\t$img$toggle{$item[0]}"; + echo "\n\t$img$toggle{$item[0]}"; } else { - echo "\n\t$img$toggle{$item[0]}"; + echo "\n\t$img$toggle{$item[0]}"; } } @@ -118,13 +119,13 @@ function _wp_menu_output( $menu, $submenu, $submenu_as_parent = true ) { // If admin.php is the current page or if the parent exists as a file in the plugins or admin dir $parent_exists = (!$admin_is_parent && file_exists(WP_PLUGIN_DIR . "/{$item[2]}") && !is_dir(WP_PLUGIN_DIR . "/{$item[2]}") ) || file_exists($item[2]); if ( $parent_exists ) - echo "{$sub_item[0]}"; + echo "{$sub_item[0]}"; elseif ( 'admin.php' == $pagenow || !$parent_exists ) - echo "{$sub_item[0]}"; + echo "{$sub_item[0]}"; else - echo "{$sub_item[0]}"; + echo "{$sub_item[0]}"; } else { - echo "{$sub_item[0]}"; + echo "{$sub_item[0]}"; } } echo ""; diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index ccb572ba0b..14f5c5f568 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -1528,18 +1528,19 @@ function the_editor($content, $id = 'content', $prev_id = 'title', $media_button // '); + var dotabkey = true; // If tinyMCE is defined. if ( typeof tinyMCE != 'undefined' ) { // This code is meant to allow tabbing from Title to Post (TinyMCE). - jQuery('#').keydown(function (e) { + jQuery('#')[jQuery.browser.opera ? 'keypress' : 'keydown'](function (e) { if (e.which == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { if ( (jQuery("#post_ID").val() < 1) && (jQuery("#title").val().length > 0) ) { autosave(); } - if ( tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden() ) { - tinyMCE.activeEditor.focus(); + if ( tinyMCE.activeEditor && ! tinyMCE.activeEditor.isHidden() && dotabkey ) { e.preventDefault(); + dotabkey = false; + tinyMCE.activeEditor.focus(); return false; } - return; } }); }