Opened 7 years ago

Closed 6 years ago

#4763 closed Bug (fixed)

Invalid behavior when pressing enter on selected text

Reported by: wwalc Owned by: garry.yao
Priority: Normal Milestone: CKEditor 3.2
Component: General Version: SVN (CKEditor) - OLD
Keywords: Confirmed Firefox Review+ Cc:

Description (last modified by wwalc)

I managed to confirm this on FF 3.5.5. I cannot reproduce it on IE8. It happens only when <br /> is at the end of line (regardless of enterMode).

Steps to reproduce

Paste the following text in soruce mode:

TEST1&nbsp;&nbsp;&nbsp; TESTESTTEST T1<br />
TEST2&nbsp;&nbsp;&nbsp; TESTESTTEST T2<br />
TEST3&nbsp;&nbsp;&nbsp; TESTESTTEST T3<br />
  • switch to WYSIWYG mode
  • put the cursor after TEST2
  • press shift-end, to select everything until the end of the line
  • then, press enter
  • the content suddenly looks like this :
TEST1    TESTESTTEST T1
TEST2
    TESTESTTEST T2
TEST3    TESTESTTEST T3

Where you would expect it to be something like :

TEST1    TESTESTTEST T1
TEST2

TEST3    TESTESTTEST T3

Attachments (2)

4763.patch (1010 bytes) - added by garry.yao 6 years ago.
4763_2.patch (1009 bytes) - added by garry.yao 6 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 7 years ago by wwalc

  • Description modified (diff)

comment:2 Changed 7 years ago by wwalc

  • Description modified (diff)

comment:3 Changed 7 years ago by fredck

  • Keywords Firefox added
  • Milestone set to CKEditor 3.2
  • Version set to SVN (CKEditor)

Changed 6 years ago by garry.yao

comment:4 Changed 6 years ago by garry.yao

  • Keywords Review? added
  • Owner set to garry.yao
  • Status changed from new to assigned

There's a logic hole in CKEDITOR.dom.range::trim method.

comment:5 Changed 6 years ago by fredck

  • Keywords Review- added; Review? removed

There is a type at line 748: this.collapsed( true )

For the rest, the patch is good.

Changed 6 years ago by garry.yao

comment:6 Changed 6 years ago by garry.yao

  • Keywords Review? added; Review- removed

comment:7 Changed 6 years ago by fredck

  • Keywords Review+ added; Review? removed

comment:8 Changed 6 years ago by garry.yao

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

Fixed with [5029].

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