You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then using the "code" plugin to view the source and click ok to apply changes then start pressing the delete button (at least 3 times) from the end of "1. Test" it will pull the next sibling element up to soon... and if you keep pressing delete it will continue to pull others early as well.
so far I have found that normally each <li> or any tag with text for that matter will have a <br data-mce-bogus="1"> after the text.
In the "code" plugin win.find('#code').value(editor.getContent({source_view: true})); strips out the <br> tags for viewing in the modal and does not put them back when it sets the contents back to the editor.
I also notice that if you paste content with a list in from word or some other source it will also not add the <br> tags to the markup during the paste processing....
So either the deleting needs to not care that the <br> tags are no longer there, maybe the bookmarks needs updated? as it seems to be one row ahead? or it needs something to check and add them back in if missing/removed
As a work around I have been able to manually add the <br> tags back in with the following code but is less than ideal....
var missingBrTags = $('#editor iframe').contents().find('.mce-content-body').find('li,p,div,span').not(':has(>br)');
$.each(missingBrTags, function(missingBrTagIndex, missingBrTag) {
if ($(missingBrTag).children().length > 0) { // contains more that just text...
var firstNestedDomElement = $(missingBrTag).children('ol,ul,p,div,span').first();
if (firstNestedDomElement.length > 0 ) { // contains major dom elements insert before the first one
$('<br data-mce-bogus="1">').insertBefore(firstNestedDomElement);
} else { // only has minor markup tags like <strong> or <em>... put br after them
$(missingBrTag).append('<br data-mce-bogus="1">');
}
} else { // contains only text
$(missingBrTag).append('<br data-mce-bogus="1">');
}
});
@Jeff-14159 I wasn't able to replicate "too soon" effect with bogus brs or without them. Tiny seems to operate properly both ways (tested in IE11 on Win 8.1). Could you record a quick video of the it happening?
Here is a video showing the delete issue, this happens after you view the "source code" but it will also happen when pasting from an outside source that doesn't have the BR tags.
Seems to be a bug in IE11 Selection object. When an "early pulling" occurs, Selection object reports LI as an anchorNode and 1 as anchorOffset, when in reality it obviously should be a text node and 3 correspondingly.
I attempted to replicate this with TinyMCE 4.9.10 and 5.2.2, however it appeared to be working as expected. It's likely the issue has been fixed since this was originally reported and as such I'll go ahead and close this. If you're still able to reproduce the issue in the latest version, then please let us know and we'll reopen this issue.
If you type out a list in an editor:
then using the "code" plugin to view the source and click ok to apply changes then start pressing the delete button (at least 3 times) from the end of "1. Test" it will pull the next sibling element up to soon... and if you keep pressing delete it will continue to pull others early as well.
so far I have found that normally each
<li>
or any tag with text for that matter will have a<br data-mce-bogus="1">
after the text.In the "code" plugin
win.find('#code').value(editor.getContent({source_view: true}));
strips out the<br>
tags for viewing in the modal and does not put them back when it sets the contents back to the editor.I also notice that if you paste content with a list in from word or some other source it will also not add the
<br>
tags to the markup during the paste processing....So either the deleting needs to not care that the
<br>
tags are no longer there, maybe the bookmarks needs updated? as it seems to be one row ahead? or it needs something to check and add them back in if missing/removedAs a work around I have been able to manually add the
<br>
tags back in with the following code but is less than ideal....using tinymce 4.4.0 & IE 11 or the editor on the main page of https://www.tinymce.com/
The text was updated successfully, but these errors were encountered: