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
This commit is contained in:
parent
f9d48f276c
commit
93f3010e7f
|
@ -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).
|
// This code is meant to allow tabbing from Title to Post (TinyMCE).
|
||||||
if ( tinyMCE.isMSIE ) {
|
if ( tinyMCE.isMSIE ) {
|
||||||
document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) {
|
document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) {
|
||||||
|
if ( tinyMCE.idCounter == 0 )
|
||||||
|
return true;
|
||||||
e = e ? e : window.event;
|
e = e ? e : window.event;
|
||||||
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
|
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
|
||||||
var i = tinyMCE.getInstanceById('<?php echo $id; ?>');
|
var i = tinyMCE.getInstanceById('<?php echo $id; ?>');
|
||||||
|
@ -1000,6 +1002,8 @@ function the_editor($content, $id = 'content', $prev_id = 'title') {
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
document.getElementById('<?php echo $prev_id; ?>').onkeypress = function (e) {
|
document.getElementById('<?php echo $prev_id; ?>').onkeypress = function (e) {
|
||||||
|
if ( tinyMCE.idCounter == 0 )
|
||||||
|
return true;
|
||||||
e = e ? e : window.event;
|
e = e ? e : window.event;
|
||||||
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
|
if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) {
|
||||||
var i = tinyMCE.getInstanceById('<?php echo $id; ?>');
|
var i = tinyMCE.getInstanceById('<?php echo $id; ?>');
|
||||||
|
|
Loading…
Reference in New Issue