Opened 11 years ago
Closed 11 years ago
#10907 closed Bug (fixed)
[IE11] Selection needs <br> filler in empty blocks
Reported by: | Piotrek Koszuliński | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.3 |
Component: | General | Version: | |
Keywords: | IE11 | Cc: |
Description (last modified by )
Broken TCs:
- Load data:
<p> </p><p> </p>
. Paragraphs are not selectable, because they are invisible.
- Click new page button - paragraph has 0 height (visible with show blocks on).
- In some cases paragraphs created by enter key are not filled with <br>. For example when leaving list by double enter.
- Data retrieved from focused editor contains both - nbsp filler and bogus br:
<p><br /> </p>
.
Related: #10992.
Change History (7)
comment:1 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:3 Changed 11 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | confirmed → assigned |
comment:4 Changed 11 years ago by
Description: | modified (diff) |
---|
comment:5 Changed 11 years ago by
Status: | assigned → review |
---|
Uh...
What's done in phase 1:
- Introduced env.needsBrFiller and env.needsNbspFiller.
- Used those flags in various places across all code base. I was using mainly needsBrFiller, but if the meaning of code was "if we need nbsp here for some reason" I was using the second flag.
Those two points actually fix most of the issues. However, few IE specific remained, so:
- Editor should fill empty block with bogus <br> on selection change - thanks to that padding is not lost when applying block styles or switching on&off lists. Note - sometimes IE places selection after appended bogus, so we need to fix this.
- It is possible to remove bogus <br> from blockless editable, so on keyup we're fixing this. I was hesitating between preventing this and fixing after it happened, but I chose the second version to KISS.
- Bogus should not be appended if we've got a fake selection.
- There was a failing test in http://ckeditor4.t/dt/plugins/list/list_enterBr.html because list plugin wasn't removing bogus <br>s when removing list. It was looking for elements with
type=_moz
so this issue was reproducible also on FF in specific cases. Now we handle also other browsers there. Also, there was a bug in the second condition there (have fun with finding it :D), so I fixed it.
That's it...
comment:6 Changed 11 years ago by
Status: | review → review_passed |
---|
I've made a small commit to fix still one issue.
These changes will require us to have more monkey testing happening in the editor this time, to ensure that basic editing features are not impacted. I'm talking about other browsers, other than IE11.
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on major with git:ac1285f on dev and 99a987c on tests.
In my opinion we should extract flags like 'needsFillerBr' and 'needsFillerNbsp' to CKEDITOR.env, or somewhere else, instead of checking in 1000000x places CKEDITOR.env.ie.