From 93f3010e7fa55585d485d5f7488c5e89e7c9a42f Mon Sep 17 00:00:00 2001 From: Matt Mullenweg 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: https://develop.svn.wordpress.org/trunk@6601 602fd350-edb4-49c9-b593-d223f7449a82 --- 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('');