[wp-trac] [WordPress Trac] #54109: Classic Editor - Image edit popup toolbar no longer appears when image has link

WordPress Trac noreply at wordpress.org
Sat Sep 11 18:35:04 UTC 2021


#54109: Classic Editor - Image edit popup toolbar no longer appears when image has
link
--------------------------+------------------------------
 Reporter:  ahortin       |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  TinyMCE       |     Version:  5.8
 Severity:  normal        |  Resolution:
 Keywords:  needs-patch   |     Focuses:
--------------------------+------------------------------
Changes (by sabernhardt):

 * keywords:   => needs-patch
 * component:  Editor => TinyMCE


Comment:

 Thanks for the report!

 I see the same in the Classic Editor with Twenty Twenty, but not with
 Twenty Seventeen, Twenty Nineteen or Twenty Twenty-One. Setting the
 (linked) images to `display:inline-block` seems to help in Twenty Twenty.

 With the ''block editor's'' Classic block, captioned images seem to have
 the same problem in any theme. Images without a caption seem to be fine.

 block-library/editor.css:
 {{{
 .wp-block-freeform.block-library-rich-text__tinymce dl.wp-caption img {
     display: block;
 }
 }}}

 This apparently relates to the `data-mce-selected="inline-boundary"`
 attribute. Removing `a[href]` from that selector list makes the image
 toolbar display again with both the Classic blocks and Classic Editor with
 Twenty Twenty. However, I am not sure we should remove the MCE attribute
 from **all** links in the editor.

 \src\js\_enqueues\vendor\tinymce\tinymce.js:
 {{{
 return editor.getParam('inline_boundaries_selector', 'a[href],code,.mce-
 annotation', 'string');
 }}}

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


More information about the wp-trac mailing list