Make WordPress Core

Changeset 22251


Ignore:
Timestamp:
10/16/2012 10:01:30 PM (14 years ago)
Author:
azaozz
Message:

Editor: fix setting wpActiveEditor when TinyMCE is not used, see #21718

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-editor.php

    r22250 r22251  
    609609                                }
    610610                        } else {
    611                                 el = document.getElementsByClassName('wp-editor-wrap');
    612                                 for ( i in el ) {
    613                                         if ( typeof(el[i]) == 'object' )
    614                                                 el[i].onmousedown = function(){ wpActiveEditor = this.id.slice(3, -5); }
     611                                if ( tinyMCEPreInit.qtInit ) {
     612                                        for ( i in tinyMCEPreInit.qtInit ) {
     613                                                el = tinyMCEPreInit.qtInit[i].id;
     614                                                if ( el )
     615                                                        document.getElementById('wp-'+el+'-wrap').onmousedown = function(){ wpActiveEditor = this.id.slice(3, -5); }
     616                                        }
    615617                                }
    616618                        }
Note: See TracChangeset for help on using the changeset viewer.