tinymce / tinymce

The world's #1 JavaScript library for rich text editing. Available for React, Vue and Angular
https://www.tiny.cloud
Other
14.96k stars 2.23k forks source link

A div without any attributes is removed when the text in a paragraph is deleted #1892

Closed TinyMCE-User closed 7 years ago

TinyMCE-User commented 10 years ago

When deleting the paragraph (either of them) from this block of code:

<g;div class="box"> <g;div> <g;div class="palette4 swatch1"> <g;p>The content<g;/p> <g;p>Goes here<g;/p> <g;/div> <g;/div> <g;/div>

It will remove the second div, unless that div has any kind of attribute applied, such as:

<g;div class="box"> <g;div data-stub="1"> <g;div class="palette4 swatch1"> <g;p>The content<g;/p> <g;p>Goes here<g;/p> <g;/div> <g;/div> <g;/div>

Expected result:

<g;div class="box"> <g;div> <g;div class="palette4 swatch1"> <g;p>The content<g;/p> <g;/div> <g;/div> <g;/div>

Actual result:

<g;div class="box"> <g;div class="palette4 swatch1"> <g;p>The content<g;/p> <g;/div> <g;/div>

This happens on TinyMCE3 and TinyMCE4.

Legacy information imported from TinyMCE bug tracker:

_#T7162 posted by amnuts_

Tags: [chrome] Status: Open Resolution: None Attached URL: http://fiddle.tinymce.com/8weaab

nori-h commented 8 years ago

I believe this is similar to #2510 and #2638. Could you have please have a look and let us know if not? Thanks, Nori @ TinyMCE

fyrkant commented 7 years ago

Closing this due to old age, if anyone still has this issue in the latest version of TinyMCE please open up a new issue.

batata004 commented 7 years ago

@fyrkant I am still having this issue with the latest TINYMCE. I detailed it here -> https://github.com/tinymce/tinymce/issues/3888

batata004 commented 7 years ago

@spocke could you open this???

batata004 commented 6 years ago

unbeliveable, nobody cares with this bug.