WordPress.org

Make WordPress Core

Ticket #22053: 22053-2.diff

File 22053-2.diff, 693 bytes (added by CoenJacobs, 9 months ago)

Fixed dannydehaan's patch, getElementByClassName should be getElementsByClassName

  • wp-includes/class-wp-editor.php

     
    608608                                                try { tinymce.init(init); } catch(e){} 
    609609                                } 
    610610                        } else { 
    611                                 el = document.getElementsByClassName('wp-editor-wrap'); 
     611                                if( document.getElementsByClassName ) { 
     612                                        el = document.getElementsByClassName('wp-editor-wrap'); 
     613                                } 
     614                                else { 
     615                                        el = document.querySelectorAll('.wp-editor-wrap'); 
     616                                } 
     617 
    612618                                for ( i in el ) { 
    613619                                        if ( typeof(el[i]) == 'object' ) 
    614620                                                el[i].onmousedown = function(){ wpActiveEditor = this.id.slice(3, -5); }