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
This commit is contained in:
parent
106df879c6
commit
37fb9152a1
|
@ -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('<?php echo $prev_id; ?>').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('<?php echo $id; ?>');
|
||||
|
@ -1000,6 +1002,8 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
|
|||
}
|
||||
} else {
|
||||
document.getElementById('<?php echo $prev_id; ?>').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('<?php echo $id; ?>');
|
||||
|
|
Loading…
Reference in New Issue