Opened 11 years ago
Closed 9 years ago
#11342 closed Bug (fixed)
[IE11] Extra paragraphs added when showing/hiding divs with CKEditor
Reported by: | Wiktor Walc | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | |
Keywords: | IE11 Support | Cc: | joel.peltonen@… |
Description (last modified by )
- This is an IE11 bug: https://connect.microsoft.com/IE/feedback/details/864804/ie11-contenteditable-br-elements-appended-to-body-when-showing-hiding-iframe-with-editable-document-inside
- See comment:16 for more details, including possible workarounds.
Extra paragraphs added when switching between tabs.
In IE 11, when using two tabs (using jQuery UI), one with CKEditor and one with plain text, whenever user switches to a tab with CKEditor and back, an additional paragraph is added at the end of content.
Content after a couple of switches:
<p>Magical ponies await</p> <p> </p> <p> </p> <p> </p> <p> <p> <p> </p> </p> </p>
Attachments (5)
Change History (25)
comment:1 Changed 11 years ago by
Description: | modified (diff) |
---|
Changed 11 years ago by
comment:2 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:3 Changed 11 years ago by
Summary: | [IE11, jQuery UI] Extra paragraphs added when switching to source mode → [IE11, jQuery UI] Extra paragraphs added when switching between tabs |
---|
comment:5 Changed 11 years ago by
Description: | modified (diff) |
---|---|
Summary: | [IE11, jQuery UI] Extra paragraphs added when switching between tabs → [IE11] Extra paragraphs added when showing/hiding divs with CKEditor |
Changed 11 years ago by
Attachment: | IE11_bug.html added |
---|
comment:6 Changed 11 years ago by
After latest update in my Win 8.1 preview (IE11 11.0.9431.228) I wasn't able to reproduce this.
I have also tried this issue on Win7 (IE11 11.0.09600.16476) and was able to reproduce both of these problems.
comment:7 Changed 11 years ago by
Description: | modified (diff) |
---|
I couldn't reproduce any problem on IE11_bug.html, but when switching tabs in 11342.zip new paragraphs are added below text. I'm checking this on IE11.0.9600.16476.
comment:9 Changed 11 years ago by
Keywords: | Support added |
---|
comment:10 Changed 11 years ago by
We'll try to investigate this issue for CKEditor 4.3.3. Although, I don't have any idea yet whether it's something serious or whether the fix will be possible now.
comment:11 Changed 11 years ago by
Hi,
I noticed when setting "config.enterMode = CKEDITOR.ENTER_BR;" it does not seem to happen.
But then I get some "<br />" at the end of the document...
That is how i have configured it:
config.coreStyles_italic = { element : 'i', overrides : 'em' }; config.enterMode = CKEDITOR.ENTER_BR; config.autoParagraph = false; config.fillEmptyBlocks = false;
And I have to really clear the IE11 cache every time... But thats maybe because of my ASP.NET project
As a workaround for ASP.NET i have added the following lines to CKEditorControl.cs:
public override string Text { get { return base.Text; } set { // Ole: clean up some stuff before saving value = System.Text.RegularExpressions.Regex.Replace(value, @"(<br /><br /> )$", ""); value = System.Text.RegularExpressions.Regex.Replace(value, @"<p> <p> <p> </p></p></p>$", ""); // optionally clean all empty paragraphs value = System.Text.RegularExpressions.Regex.Replace(value, @"<p> </p>", ""); base.Text = value; } }
comment:12 Changed 11 years ago by
Milestone: | → CKEditor 4.4.1 |
---|
comment:13 Changed 11 years ago by
I'm seeing this also. And can reproduce it with that IE11_bug.html.
Version: 11.0.9600.17041 Update Versions: 11.0.7 (KB2929437)
In my environment this is kind of nasty bug which is really annoying. Would appreciate lower milestone as 4.4.1.
comment:14 Changed 11 years ago by
If the editor is in source mode, then no extra paragraphs are added.
comment:15 Changed 11 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | confirmed → assigned |
Changed 11 years ago by
Attachment: | 11342_3.html added |
---|
Changed 11 years ago by
Attachment: | 11342_editable.html added |
---|
Changed 11 years ago by
Attachment: | 11342_2.html added |
---|
comment:16 Changed 11 years ago by
Milestone: | CKEditor 4.4.1 |
---|---|
Owner: | Piotrek Koszuliński deleted |
Status: | assigned → confirmed |
Unfortunately this turned out to be an ugly IE11 bug. It can be reproduced without CKEditor. Download 11342_3.html and 11342_editable.html and open the first sample. Then open console and press show/hide few times. You'll see <br>
appended and removed. What's funny, showing "editor" appends 2 <br>s
when hiding removes one.
I can't think of any reasonable hack we could implement. We don't know the source of those <br>s
, so we cannot arbitrarily remove them. However, you can implement a workaround - after showing editor just remove any <br>
which is a direct descendant of editable. That's it.
Also, note that this issue cannot be reproduced on inline editor (see 11342_2.html), so you could also use the divarea.
comment:17 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:18 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:19 Changed 9 years ago by
I couldn't reproduce the comment:16 bug. Maybe It has been entirely fixed?
IE11(11.0.9600.18283) on win8.1 Enterprise evaluation(ModernIE) IE11(11.0.9600.18282) on win7 SP1 IE10(10.0.9200.17607) on win8 Enterprise evaluation(ModernIE)
The html loads ckeditor 4.5.8 but it's not being used I believe.
comment:20 Changed 9 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
I could not reproduce the problem from comment:16 as well as original issue. Seems like both issues has expired on trunk. I'm closing the ticket as fixed.
The attached file contains the sample and all required files to reproduce it.