Opened 15 years ago

Closed 15 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

  1. Open the replace by class example page with enterMode: P;
  2. Click on 'New Page' button to clear all content;
  3. Enter one line text and press enter key;
  4. 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)

3473.patch (1.9 KB) - added by Garry Yao 15 years ago.
3473_2.patch (1.3 KB) - added by Josh Nisly 15 years ago.
3473_3.patch (1.3 KB) - added by Garry Yao 15 years ago.
3473_4.patch (823 bytes) - added by Frederico Caldeira Knabben 15 years ago.
3473_5.patch (1.5 KB) - added by Garry Yao 15 years ago.
3473_6.patch (1.9 KB) - added by Garry Yao 15 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 Changed 15 years ago by Garry Yao

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

Changed 15 years ago by Garry Yao

Attachment: 3473.patch added

comment:2 Changed 15 years ago by Garry Yao

Keywords: Webkit HasPatch added

The patch is proposing the following changes:

  1. Checking block line content before appending the bogus br.
  2. My testing doesn't shows opera is needing bogus br, please correct me.

comment:3 Changed 15 years ago by Josh Nisly

This is similar to #3405.

Changed 15 years ago by Josh Nisly

Attachment: 3473_2.patch added

comment:4 Changed 15 years ago by Josh Nisly

The previous patch contained some extraneous changes that were committed in r3461. I have attached a new patch without those changes.

comment:5 Changed 15 years ago by Josh Nisly

This patch fixes #3405 for me. Review?

Changed 15 years ago by Garry Yao

Attachment: 3473_3.patch added

comment:6 Changed 15 years ago by Garry Yao

Component: GeneralCore : Styles
Keywords: Review? added; HasPatch removed
Owner: set to Garry Yao
Status: newassigned

Merge highjinx's patch with the latest fixing at #3469.

comment:7 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed
Owner: changed from Garry Yao to Frederico Caldeira Knabben
Status: assignednew

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 15 years ago by Frederico Caldeira Knabben

Attachment: 3473_4.patch added

comment:8 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed
Status: newassigned

comment:9 Changed 15 years ago by Garry Yao

Keywords: Review+ added; Review? removed

comment:10 Changed 15 years ago by Frederico Caldeira Knabben

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 15 years ago by Garry Yao

Attachment: 3473_5.patch added

comment:11 Changed 15 years ago by Garry Yao

Keywords: Review? added; Review- removed
Owner: changed from Frederico Caldeira Knabben to Garry Yao
Status: assignednew

I'm attaching a new patch to address this issue, and take over this ticket.

comment:12 Changed 15 years ago by Frederico Caldeira Knabben

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 15 years ago by Garry Yao

Attachment: 3473_6.patch added

comment:13 Changed 15 years ago by Garry Yao

Keywords: Review? added; Review- removed
Status: newassigned

Fred has found a way to hack out since it's a special case where only happen here.

comment:14 Changed 15 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:15 Changed 15 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [3493].

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy