Opened 7 years ago

Closed 7 years ago

#6629 closed Bug (fixed)

Inconsistent behavior when applying paragraph format

Reported by: Wiktor Walc Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.6
Component: General Version: 3.1
Keywords: Cc:

Description

When "Formatted" paragraph format is used, the behavior of the editor is different that ussual.

Steps to reproduce

Scenario 1

  • starting with a new blank page
  • select "Heading 2" format
  • switch to source mode
  • result: no HTML code, source is empty
  • switch to wysiwyg mode
  • result: "Heading 2" is still selected

Scenario 2

  • starting with a new blank page
  • select "Formatted" fomat
  • switch to source mode
  • result: HTML source
    <pre>
    </pre>
    <p>
    	&nbsp;</p>
    

Problems:

  1. HTML source is not empty
  2. There is an empty paragraph at the bottom

Attachments (3)

6629.patch (3.2 KB) - added by Garry Yao 7 years ago.
6629_2.patch (3.2 KB) - added by Garry Yao 7 years ago.
6629_3.patch (3.3 KB) - added by Garry Yao 7 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 7 years ago by Garry Yao

Milestone: CKEditor 3.4.3
Resolution: fixed
Status: newclosed

Fixed with [6142].

comment:2 Changed 7 years ago by Garry Yao

As after #5402, we're able to exit from <pre> with SHIFT-ENTER.

comment:3 Changed 7 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.4.3CKEditor 3.5.1
Resolution: fixed
Status: closedreopened

I've reverted [6142] with [6181] because the SHIFT+ENTER strategy to move out our <pre> is counter-intuitive.

A better solution need to be found. Probably aligning the <pre> behavior to <p> is the best we should do, just like proposed at ticket:5402#comment:11.

comment:4 Changed 7 years ago by Garry Yao

Status: reopenedconfirmed

Depends on #6841.

comment:5 Changed 7 years ago by Wiktor Walc

Milestone: CKEditor 3.5.1CKEditor 3.6

Considering that #6841 is targeted to 3.6, moving this one there.

Changed 7 years ago by Garry Yao

Attachment: 6629.patch added

comment:6 Changed 7 years ago by Garry Yao

Owner: set to Garry Yao
Status: confirmedreview

Besides the keystroke change, the patch propose of using <br> consistently in all browsers inside pre-formatted block which leads to following benefits:

  1. Reduce selection bug introduced by using text-only breaks;
  2. Easier range position management after line break insertion.

Changed 7 years ago by Garry Yao

Attachment: 6629_2.patch added

comment:7 Changed 7 years ago by Garry Yao

Update patch after [6682], line break fixing part of previous patch moved to #7170.

comment:8 Changed 7 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

I'm still having an empty <pre> in the source view (reported problem "1").

Changed 7 years ago by Garry Yao

Attachment: 6629_3.patch added

comment:9 Changed 7 years ago by Garry Yao

Status: review_failedreview

comment:10 Changed 7 years ago by Frederico Caldeira Knabben

Status: reviewreview_passed

comment:11 Changed 7 years ago by Garry Yao

Resolution: fixed
Status: review_passedclosed

Fixed with [6698] on trunk.

Note: See TracTickets for help on using tickets.
© 2003 – 2017 CKSource – Frederico Knabben. All rights reserved. | Terms of use | Privacy policy