WordPress.org

Make WordPress Core

Changeset 5602


Ignore:
Timestamp:
05/31/07 00:24:31 (7 years ago)
Author:
rob1n
Message:

Check that tinyMCE is defined. Props johnbillion. fixes #4257

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/general-template.php

    r5563 r5602  
    908908    edCanvas = document.getElementById('<?php echo $id; ?>'); 
    909909    <?php if ( $prev_id && user_can_richedit() ) : ?> 
     910    // If tinyMCE is defined. 
     911    if ( typeof tinyMCE != 'undefined' ) { 
    910912    // This code is meant to allow tabbing from Title to Post (TinyMCE). 
    911     if ( tinyMCE.isMSIE ) 
    912         document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) 
    913             { 
     913        if ( tinyMCE.isMSIE ) { 
     914            document.getElementById('<?php echo $prev_id; ?>').onkeydown = function (e) { 
    914915                e = e ? e : window.event; 
    915916                if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 
     
    924925                } 
    925926            } 
    926     else 
    927         document.getElementById('<?php echo $prev_id; ?>').onkeypress = function (e) 
    928             { 
     927        } else { 
     928            document.getElementById('<?php echo $prev_id; ?>').onkeypress = function (e) { 
    929929                e = e ? e : window.event; 
    930930                if (e.keyCode == 9 && !e.shiftKey && !e.controlKey && !e.altKey) { 
     
    939939                } 
    940940            } 
     941        } 
     942    } 
    941943    <?php endif; ?> 
    942944    //--> 
Note: See TracChangeset for help on using the changeset viewer.