#14341 closed defect (bug) (worksforme)
Adjacent image disappears when a caption is added
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | |
Component: | TinyMCE | Keywords: | |
Focuses: | Cc: |
Description
If you place two images side by side inside a strong tag and then try to add a caption to one of the images, the other image disappears.
Tested in r15436.
To reproduce:
1) Open a new or existing post for editing
2) Place the sample code from below into the html editor
3) Switch to the visual editor and try to add a caption
---> You'll see the other image disappear
Here is a screencast example: http://screencast.com/t/OTNmNjQzN
Here is some sample code:
<strong><a href="http://s.wordpress.org/about/images/logo-grey/grey-m.png"><img class="alignleft size-full" title="grey logo" src="http://s.wordpress.org/about/images/logo-grey/grey-m.png" alt="" width="100" height="100" /></a><a href="http://s.wordpress.org/about/images/logo-blue/blue-m.png"><img class="alignleft size-full" title="blue logo" src="http://s.wordpress.org/about/images/logo-blue/blue-m.png" alt="" width="100" height="100" /></a></strong>
Change History (5)
#2
@
12 years ago
- Component changed from General to TinyMCE
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
- Severity changed from normal to major
Still broken in r17316.
#3
@
12 years ago
<strong> is an inline tag, inserting a block tag like <div> or <dd> in there makes the HTML invalid. I think the browsers have difficulties displaying such HTML in contentEditable mode. In order to "fix" the invalidly nested tags it seems TinyMCE removes the <strong> node leaving only the new block node there.
Not sure what we can do about these border cases where user edited code is later edited in the visual editor leading to invalid HTML.
Is this a regression? I imagine not.
Can it be tested again on the new version of TinyMCE?