[wp-trac] [WordPress Trac] #36223: Editor statusbar not correctly toggled when wordpress_adv_hidden is set to false.

WordPress Trac noreply at wordpress.org
Sun Mar 13 02:06:35 UTC 2016


#36223: Editor statusbar not correctly toggled when wordpress_adv_hidden is set to
false.
--------------------------+-----------------------------
 Reporter:  dorapen       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  TinyMCE       |    Version:  4.4.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When wordpress_adv_hidden option is set to false for TinyMCE, the
 behaviour of kitchen sink button is inconsistent.
 The advanced menu bar shows by default as above option is set to false,
 however the statusbar has "visibility: hidden" style added after it has
 been loaded.
 And when the toggle button is pressed, the menu bar goes away and
 statusbar appears.

 When toggle button is pressed several times to match default behaviour (as
 same as above optioin is set to true) and page is reloaded, now the
 behaviour works as normal again.

 This is due to mishandled 'hidetb' value in wp-
 includes/js/tinymce/plugins/wordpress/plugin.js, which also effect
 'advanced' variable in wp-admin/js/editor-expand.js, in which styling for
 statusbar is toggled.

 Specifically it is line 78 of wp-
 includes/js/tinymce/plugins/wordpress/plugin.js, as follows:

 {{{
 // Hide the toolbars after loading
 editor.on( 'PostRender', function() {
   if ( editor.getParam( 'wordpress_adv_hidden', true ) && getUserSetting(
 'hidetb', '0' ) === '0' ) {
     toggleToolbars( 'hide' );
   }
 });
 }}}

 This part of code does not handle the case of wordpress_adv_hidden set to
 false, which I believe is causing the problem.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/36223>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list