[wp-trac] [WordPress Trac] #19389: Subsequent image insertion after captioned image causes breakage

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 29 03:41:33 UTC 2011


#19389: Subsequent image insertion after captioned image causes breakage
--------------------------+-----------------------------
 Reporter:  hew           |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  TinyMCE       |    Version:
 Severity:  normal        |   Keywords:
--------------------------+-----------------------------
 '''Repro (trunk):'''

 1. Insert an image with a caption. The Visual Editor should now report a
 path like this:
 {{{
 Path: div » dl.wp-caption alignnone » dd.wp-caption-dd
 }}}

 2. Immediately click "Add Media" and insert another image again (don't
 move cursor or anything else) with another caption. The insertion should
 mangle the previous image and leave a path like this in the Visual Editor:
 {{{
 Path: div » dl.wp-caption alignnone » dd.wp-caption-dd » div » dl.wp-
 caption alignnone » dd.wp-caption-dd
 }}}

 Bonus: Enter can be pressed in the Visual Editor after step #1. That
 inserts a new paragraph as expected with the Visual Editor reporting
 "Path: p". Toggle to the HTML editor and then back to the Visual Editor.
 The caption element is now active (Path: div » dl.wp-caption alignnone »
 dd.wp-caption-dd) and an insertion at this point will cause chaos (step
 #2).

 '''Repro (3.2.1):'''[[br]]
 Same as trunk except that the "Bonus" (toggling to HTML and back to
 Visual) does not apply.

 '''Expected behavior:'''
 That a subsequent image insertion would be cleanly inserted without
 requiring manual cursor movement.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/19389>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list