[wp-trac] [WordPress Trac] #41259: Editing an image link in the Editor produces one additional, empty link

WordPress Trac noreply at wordpress.org
Wed Jul 19 13:35:17 UTC 2017


#41259: Editing an image link in the Editor produces one additional, empty link
-----------------------------------------+--------------------
 Reporter:  afercia                      |       Owner:
     Type:  defect (bug)                 |      Status:  new
 Priority:  normal                       |   Milestone:  4.8.1
Component:  Editor                       |     Version:  4.8
 Severity:  normal                       |  Resolution:
 Keywords:  has-screenshots needs-patch  |     Focuses:
-----------------------------------------+--------------------

Comment (by xkon):

 Sorry @afercia you are correct I had messed up files. Same file as spocke
 says plugin.js arround 410 line we have :

 `if ( linkNode = dom.getParent( imageNode, 'a' ) ) { `

 This is what is causing the extra <a> to appear as it moves the image out
 of any link that has extra content. I've just tested it with console.logs
 and that's what triggers every time the empty <a> is created.

 I'll play around with that when I get home in case I find a solution. I've
 also checked spockes code but didn't change anything here. I'll retest it
 when back home.

 Best regards,
 Konstantinos

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


More information about the wp-trac mailing list