[wp-trac] [WordPress Trac] #48902: Customizer code editor CSS breaks on activate() (Or breaks when loaded later)

WordPress Trac noreply at wordpress.org
Wed Dec 11 06:37:21 UTC 2019


#48902: Customizer code editor CSS breaks on activate() (Or breaks when loaded
later)
-------------------------------------+------------------------------
 Reporter:  vukvukovich              |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Awaiting Review
Component:  Customize                |     Version:  4.9
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+------------------------------
Changes (by dlh):

 * keywords:  reporter-feedback => has-patch needs-testing


Comment:

 Thanks so much for that sample plugin, @vukvukovich!

 This situation looks similar to me to a bug report in the CodeMirror repo:
 https://github.com/codemirror/CodeMirror/issues/61. The issue there was
 closed with a pointer to [https://codemirror.net/doc/manual.html#refresh
 CodeMirror's .refresh()] method.

 I've taken that and attempted to apply it to the `CodeEditorControl` in
 [attachment:"48902.diff"]: If the control is not yet active even when its
 parent section is active, `codemirror.refresh()` is called the first time
 the control becomes active.

 @vukvukovich, would you be able to test the patch?

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


More information about the wp-trac mailing list