From 2309fcb9d79c3ca182b3cfe342cb194255619088 Mon Sep 17 00:00:00 2001 From: azaozz Date: Sun, 22 Jul 2012 02:33:53 +0000 Subject: [PATCH] TinyMCE: fix tabbig in and out of the editor, fixes #20834 git-svn-id: http://core.svn.wordpress.org/trunk@21300 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 2 +- wp-admin/includes/post.php | 4 +-- wp-includes/class-wp-editor.php | 3 +- wp-includes/js/autosave.dev.js | 35 +++++++++---------- .../tinymce/plugins/tabfocus/editor_plugin.js | 2 +- .../plugins/tabfocus/editor_plugin_src.js | 9 ++--- 6 files changed, 25 insertions(+), 30 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 2a5d56fab9..6eddf5dd58 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -312,7 +312,7 @@ wp_nonce_field( 'samplepermalink', 'samplepermalinknonce', false );
-post_content, 'content', array('dfw' => true, 'tabindex' => 1) ); ?> +post_content, 'content', array('dfw' => true, 'tabindex' => 1, 'tabfocus_elements' => 'sample-permalink,post-preview') ); ?> diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 239fabd685..c57b72c139 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -1091,7 +1091,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { } if ( false === strpos($permalink, '%postname%') && false === strpos($permalink, '%pagename%') ) { - $return = '' . __('Permalink:') . "\n" . '' . $permalink . "\n"; + $return = '' . __('Permalink:') . "\n" . '' . $permalink . "\n"; if ( '' == get_option( 'permalink_structure' ) && current_user_can( 'manage_options' ) && !( 'page' == get_option('show_on_front') && $id == get_option('page_on_front') ) ) $return .= '' . __('Change Permalinks') . "\n"; if ( isset($view_post) ) @@ -1120,7 +1120,7 @@ function get_sample_permalink_html( $id, $new_title = null, $new_slug = null ) { $display_link = str_replace(array('%pagename%','%postname%'), $post_name_html, $permalink); $view_link = str_replace(array('%pagename%','%postname%'), $post_name, $permalink); $return = '' . __('Permalink:') . "\n"; - $return .= '' . $display_link . "\n"; + $return .= '' . $display_link . "\n"; $return .= '‎'; // Fix bi-directional text display defect in RTL languages. $return .= '' . __('Edit') . "\n"; $return .= '' . $post_name . "\n"; diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 7dc908d6e4..b74e524c28 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -34,6 +34,7 @@ final class _WP_Editors { 'textarea_name' => $editor_id, // set the textarea name to something different, square brackets [] can be used here 'textarea_rows' => get_option('default_post_edit_rows', 10), // rows="..." 'tabindex' => '', + 'tabfocus_elements' => ':prev,:next', // the previous and next element ID to move the focus to when pressing the Tab key in TinyMCE 'editor_css' => '', // intended for extra styles for both visual and Text editors buttons, needs to include the
0' ); ?>