Opened 8 years ago

Closed 8 years ago

#4763 closed Bug (fixed)

Invalid behavior when pressing enter on selected text

Reported by: Wiktor Walc 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 Wiktor Walc)

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 8 years ago.
4763_2.patch (1009 bytes) - added by Garry Yao 8 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 Changed 8 years ago by Wiktor Walc

Description: modified (diff)

comment:2 Changed 8 years ago by Wiktor Walc

Description: modified (diff)

comment:3 Changed 8 years ago by Frederico Caldeira Knabben

Keywords: Firefox added
Milestone: CKEditor 3.2
Version: SVN (CKEditor)

Changed 8 years ago by Garry Yao

Attachment: 4763.patch added

comment:4 Changed 8 years ago by Garry Yao

Keywords: Review? added
Owner: set to Garry Yao
Status: newassigned

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

comment:5 Changed 8 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

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

For the rest, the patch is good.

Changed 8 years ago by Garry Yao

Attachment: 4763_2.patch added

comment:6 Changed 8 years ago by Garry Yao

Keywords: Review? added; Review- removed

comment:7 Changed 8 years ago by Frederico Caldeira Knabben

Keywords: Review+ added; Review? removed

comment:8 Changed 8 years ago by Garry Yao

Resolution: fixed
Status: assignedclosed

Fixed with [5029].

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