Opened 17 years ago
Closed 17 years ago
#3473 closed Bug (fixed)
[FF] Bogus doubled line break nums
| Reported by: | Garry Yao | Owned by: | Garry Yao |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 3.0 |
| Component: | Core : Styles | Version: | |
| Keywords: | Firefox Webkit Review+ | Cc: |
Description
Currently the padding block bogus br logic is not right, it's appending the br for every newly established block, which sometimes cause too much line breaks:
Reproducing Procedures
- Open the replace by class example page with enterMode: P;
- Click on 'New Page' button to clear all content;
- Enter one line text and press enter key;
- Now press backspace key to delete the new line;
- Expected Result: One key strike will bring you back to the first line;
- Actual Result: Three key strike is necessary to back to the first line;
Attachments (6)
Change History (21)
comment:1 Changed 17 years ago by
Changed 17 years ago by
| Attachment: | 3473.patch added |
|---|
comment:2 Changed 17 years ago by
| Keywords: | Webkit HasPatch added |
|---|
The patch is proposing the following changes:
- Checking block line content before appending the bogus br.
- My testing doesn't shows opera is needing bogus br, please correct me.
Changed 17 years ago by
| Attachment: | 3473_2.patch added |
|---|
comment:4 Changed 17 years ago by
The previous patch contained some extraneous changes that were committed in r3461. I have attached a new patch without those changes.
Changed 17 years ago by
| Attachment: | 3473_3.patch added |
|---|
comment:6 Changed 17 years ago by
| Component: | General → Core : Styles |
|---|---|
| Keywords: | Review? added; HasPatch removed |
| Owner: | set to Garry Yao |
| Status: | new → assigned |
Merge highjinx's patch with the latest fixing at #3469.
comment:7 Changed 17 years ago by
| Keywords: | Review- added; Review? removed |
|---|---|
| Owner: | changed from Garry Yao to Frederico Caldeira Knabben |
| Status: | assigned → new |
Talking with Garry, we've found out that a simpler solution can be found for it. I'm attaching a new patch for it.
Changed 17 years ago by
| Attachment: | 3473_4.patch added |
|---|
comment:8 Changed 17 years ago by
| Keywords: | Review? added; Review- removed |
|---|---|
| Status: | new → assigned |
comment:9 Changed 17 years ago by
| Keywords: | Review+ added; Review? removed |
|---|
comment:10 Changed 17 years ago by
| Keywords: | Review- added; Review+ removed |
|---|
It turned out that this patch breaks the SHIFT+ENTER behavior, or even the ENTER key when enterMode = 'br'.
Changed 17 years ago by
| Attachment: | 3473_5.patch added |
|---|
comment:11 Changed 17 years ago by
| Keywords: | Review? added; Review- removed |
|---|---|
| Owner: | changed from Frederico Caldeira Knabben to Garry Yao |
| Status: | assigned → new |
I'm attaching a new patch to address this issue, and take over this ticket.
comment:12 Changed 17 years ago by
| Keywords: | Review- added; Review? removed |
|---|
The problem with \ufeff is that it makes the caret stopping, as it counts like a visible character for the browser.
Changed 17 years ago by
| Attachment: | 3473_6.patch added |
|---|
comment:13 Changed 17 years ago by
| Keywords: | Review? added; Review- removed |
|---|---|
| Status: | new → assigned |
Fred has found a way to hack out since it's a special case where only happen here.
comment:14 Changed 17 years ago by
| Keywords: | Review+ added; Review? removed |
|---|

The solution here would be checking if the new block already has some line content before appending the bogus br.