Opened 6 years ago

Closed 5 years ago

#6629 closed Bug (fixed)

Inconsistent behavior when applying paragraph format

Reported by: wwalc 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 5 years ago.
6629_2.patch (3.2 KB) - added by garry.yao 5 years ago.
6629_3.patch (3.3 KB) - added by garry.yao 5 years ago.

Download all attachments as: .zip

Change History (14)

comment:1 Changed 6 years ago by garry.yao

  • Milestone set to CKEditor 3.4.3
  • Resolution set to fixed
  • Status changed from new to closed

Fixed with [6142].

comment:2 Changed 6 years ago by garry.yao

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

comment:3 Changed 6 years ago by fredck

  • Milestone changed from CKEditor 3.4.3 to CKEditor 3.5.1
  • Resolution fixed deleted
  • Status changed from closed to reopened

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 5 years ago by garry.yao

  • Status changed from reopened to confirmed

Depends on #6841.

comment:5 Changed 5 years ago by wwalc

  • Milestone changed from CKEditor 3.5.1 to CKEditor 3.6

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

Changed 5 years ago by garry.yao

comment:6 Changed 5 years ago by garry.yao

  • Owner set to garry.yao
  • Status changed from confirmed to review

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 5 years ago by garry.yao

comment:7 Changed 5 years ago by garry.yao

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

comment:8 Changed 5 years ago by fredck

  • Status changed from review to review_failed

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

Changed 5 years ago by garry.yao

comment:9 Changed 5 years ago by garry.yao

  • Status changed from review_failed to review

comment:10 Changed 5 years ago by fredck

  • Status changed from review to review_passed

comment:11 Changed 5 years ago by garry.yao

  • Resolution set to fixed
  • Status changed from review_passed to closed

Fixed with [6698] on trunk.

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