[wp-trac] [WordPress Trac] #34355: Cannot remove link using link toolbar if link text is wrapped in code tags

WordPress Trac noreply at wordpress.org
Mon Oct 19 14:11:09 UTC 2015


#34355: Cannot remove link using link toolbar if link text is wrapped in code tags
--------------------------+-----------------------------
 Reporter:  jdgrimes      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Editor        |    Version:  4.3.1
 Severity:  normal        |   Keywords:
  Focuses:  ui            |
--------------------------+-----------------------------
 '''Steps to Reproduce'''

 1. Create a new post with this content:
 {{{
 The <a
 href="https://developer.wordpress.org/reference/functions/add_post_meta/"><code>add_post_meta()</code></a>
 function.
 }}}
 2. Place your cursor within the link.
 3. When the link toolbar appears, click the Remove button.

 '''Expected Result'''

 The link is removed.

 '''Actual Result'''

 Nothing happens.


 ----

 If you remove the `<code>` tags, or add more text to the link and place
 the cursor outside the code tags, the problem goes away.

 If you use a different tag, `<span>` for example, it works correctly.

 I assume that tinyMCE is running the `unlink` command against the `code`
 tags instead of the `a` tag, and therefore it is failing.

 I have tested this in trunk and in version 4.3.1.

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


More information about the wp-trac mailing list