[wp-trac] [WordPress Trac] #45461: Incorrect height of the WP editor, when loaded in a hidden layer

WordPress Trac noreply at wordpress.org
Tue Jan 15 20:07:13 UTC 2019


#45461: Incorrect height of the WP editor, when loaded in a hidden layer
--------------------------+----------------------
 Reporter:  nnikolov      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  TinyMCE       |     Version:  5.0
 Severity:  normal        |  Resolution:  invalid
 Keywords:  needs-patch   |     Focuses:
--------------------------+----------------------
Changes (by azaozz):

 * status:  new => closed
 * resolution:   => invalid
 * milestone:  5.1 =>


Comment:

 > Isn't there some kind of order in which bugs are fixed relative to the
 order that they come in?

 No. They are rather fixed in order f priority, i.e. if they are a
 regression, how severe the bug is, now many users are affected, if there
 is a patch, etc.

 > I understand that it is a free software and you owe me nothing.

 That's not the case :)

 Unfortunately I don't think this is fixable in core. Hidden elements in
 HTML don't have (browser calculated) dimensions. There is no way for
 TinyMCE (or any other JS) to get that hidden div's height simply because
 the browser doesn't know it. That can be done after it is shown.

 Your best bet is to initialize TinyMCE on the same event used to show that
 div, right after you remove the `display: none`. Alternatively you can try
 setting the editor height (in the init object) and then resize it after
 the div is shown.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/45461#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list