[wp-trac] [WordPress Trac] #42416: Code assumes iframe mode, exception in inline mode

WordPress Trac noreply at wordpress.org
Thu Nov 2 06:52:19 UTC 2017


#42416: Code assumes iframe mode, exception in inline mode
--------------------------+-----------------------------
 Reporter:  programmin    |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  TinyMCE       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 In 4.9 RC the editor has this in wp-includes/js/mce-view.js:


 {{{
                         // Obtain the target width for the embed.
                         if ( self.editor ) {
                                 maxwidth =
 self.editor.iframeElement.clientWidth - 20; // Minus the sum of horizontal
 margins and borders.
                         }
 }}}

 This should probably be editor.bodyElement when an editor is in [inline
 https://www.tinymce.com/docs/demo/inline/] mode not the iframed mode.

 self.editor.iframeElement causes an exception.

 Possibly somewhat related to https://core.trac.wordpress.org/ticket/28929
 but I hadn't noticed that problem recently.

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


More information about the wp-trac mailing list