Opened 11 years ago
Closed 11 years ago
#10854 closed Bug (fixed)
[FF] Image2 in Firefox: Problems with autoparagraphing
Reported by: | Olek Nowodziński | Owned by: | Piotrek Koszuliński |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.3 |
Component: | General | Version: | 4.3 Beta |
Keywords: | Cc: |
Description
- Open samples/plugins/image2/image2.html
- Use the following code:
<figure class="caption" style="float:right"><img alt="Saturn V" src="assets/image1.jpg" width="200" /> <figcaption>Roll out of Saturn V on launch pad</figcaption> </figure>
- Switch to WYSIWYG and back to source:
<p> <figure class="caption" style="float:right"><img alt="Saturn V" src="assets/image1.jpg" width="200" /> <figcaption>Roll out of Saturn V on launch pad</figcaption> </figure> </p>
- Switch to WYSIWYG and back to source:
<p> </p> <figure class="caption" style="float:right"><img alt="Saturn V" src="assets/image1.jpg" width="200" /> <figcaption>Roll out of Saturn V on launch pad</figcaption> </figure> <p> </p>
- 3. and 4. should never happen.
Change History (7)
comment:1 Changed 11 years ago by
Status: | new → confirmed |
---|
comment:3 Changed 11 years ago by
Summary: | Image2 in Firefox: Problems with autoparagraphing → [FF] Image2 in Firefox: Problems with autoparagraphing |
---|
Title updated.
comment:4 Changed 11 years ago by
Owner: | set to Piotrek Koszuliński |
---|---|
Status: | confirmed → assigned |
comment:5 Changed 11 years ago by
Status: | assigned → review |
---|
Pushed t/10854 on dev and tests.
We decided to strip leading <br> in htmlDataProcessor#toDataFormat
.
comment:6 Changed 11 years ago by
Status: | review → review_passed |
---|
Please just have the regex simplified to this:
/^<br *\/?>/i
comment:7 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed on major with git:2d9c3ff on dev and with 2e1b8cb on tests.
This is caused by FF's bug which I reported in https://bugzilla.mozilla.org/show_bug.cgi?id=911201
Firefox appends bogus <br> before non-editable element what then affects parser which wraps this in a paragraph. We cannot fix (without hacking) what FF does, but we should fix the second part - broken parser. We can also add a small hack which will remove bogus <br> from the beginning of document.