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

WordPress Trac wp-trac at lists.automattic.com
Tue Nov 29 16:21:12 UTC 2011


#19389: Subsequent image insertion after captioned image causes breakage
--------------------------+-----------------------------
 Reporter:  hew           |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  TinyMCE       |     Version:  2.7
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+-----------------------------
Changes (by azaozz):

 * version:  3.2.1 => 2.7
 * milestone:  Awaiting Review => Future Release


Comment:

 This has been around since image captions were introduced back in 2.7. The
 problem is that to place the caret in contentEditable mode the browsers
 need a block level element with some sort of content in it. FF has <br
 data-mce-bogus="1">, WebKit has U+00A0 (UTF for non-breaking space), etc.
 So for placing the caret we would need to insert something like <p><br
 data-mce-bogus="1"></p> or <p>u\00a0</p> after the caption which brings
 other problems when another caption is not inserted in the editor straight
 away.

 The current behavior is a compromise. On the other hand we probably can
 re-examine the process of inserting a shortcode in TinyMCE and converting
 it to a bunch of DOM elements as the browsers have evolved a bit in that
 area since the last time.

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


More information about the wp-trac mailing list