From 37fb9152a1c0335eb382ec862e2ed560578af2f4 Mon Sep 17 00:00:00 2001 From: matt Date: Sat, 12 Jan 2008 01:55:51 +0000 Subject: [PATCH] Don't try fancy tab focus if the WYSIWYG isn't active. Hat tip: skeltoac. git-svn-id: http://svn.automattic.com/wordpress/trunk@6601 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/general-template.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index 8bef63b067..ad9913ab6e 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -986,6 +986,8 @@ function the_editor($content, $id = 'content', $prev_id = 'title') { // This code is meant to allow tabbing from Title to Post (TinyMCE). if ( tinyMCE.isMSIE ) { document.getElementById('').onkeydown = function (e) { + if ( tinyMCE.idCounter == 0 ) + return true; e = e ? e : window.event; if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { var i = tinyMCE.getInstanceById(''); @@ -1000,6 +1002,8 @@ function the_editor($content, $id = 'content', $prev_id = 'title') { } } else { document.getElementById('').onkeypress = function (e) { + if ( tinyMCE.idCounter == 0 ) + return true; e = e ? e : window.event; if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { var i = tinyMCE.getInstanceById('');