Opened 16 years ago

Closed 16 years ago

#3477 closed Bug (fixed)

Enter prepends newline sometimes

Reported by: Tobiasz Cudnik Owned by: Garry Yao
Priority: Normal Milestone: CKEditor 3.0
Component: General Version: SVN (CKEditor) - OLD
Keywords: Confirmed Cc:

Description

Enter prepends newline sometimes, instead of splitting actual line.

  1. Using following source:
    <strong>a</strong>b^
    
  2. Move cursor to the left, between "a" and "b"
  3. Hit enter, empty newline will be prepended

Issue doesn't exist when moving from left to right.

Reproduced in r3461. Works fine in public demo.

Env: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.9) Gecko/2009042219 Iceweasel/3.0.9 (Debian-3.0.9-1)

Attachments (3)

test_range_checkStartOfBlock.patch (2.7 KB) - added by Garry Yao 16 years ago.
Unit Test Case
3477.patch (1.0 KB) - added by Garry Yao 16 years ago.
3477_2.patch (885 bytes) - added by Garry Yao 16 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Confirmed added
Milestone: CKEditor 3.0

Confirmed. I have the following result after ENTER:

<p>
	<br />
</p>
<p>
	<strong>^a</strong>b</p>

comment:2 Changed 16 years ago by Garry Yao

Owner: set to Garry Yao
Status: newassigned

comment:3 Changed 16 years ago by Garry Yao

I've identified the bug was caused by CKEDITOR.dom.range.checkStartOfBlock, which is under construction in #3367, I'll attaching the TC for this ticket at there.
Leaving this one opened and re-eval after #3367 is fixed.

Changed 16 years ago by Garry Yao

Unit Test Case

Changed 16 years ago by Garry Yao

Attachment: 3477.patch added

comment:4 Changed 16 years ago by Garry Yao

Keywords: Review? added

comment:5 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

The proposed change is wrong because it changes an intrinsic feature in the checkStartOfBlock feature, as it's related to the "visual" representation of the range, not to the precise position of its boundaries. For example:

<p><b></b>^Example</p>

The above range must return "true" for checkStartOfBlock.

Changed 16 years ago by Garry Yao

Attachment: 3477_2.patch added

comment:6 in reply to:  5 Changed 16 years ago by Garry Yao

Keywords: Review? added; Review- removed

Replying to fredck: My fault, definitely the previous was a wrong fix.

comment:7 Changed 16 years ago by Garry Yao

But I still want to confirm if it's good to substitute '!inlineChildReqElements ' with 'CKEDITOR.dtd.$empty' also.

comment:8 Changed 16 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed

I think this is related to a bug in the iterate function, identified by Martin. He may take care of this on. Please confirm it with him first.

comment:9 Changed 16 years ago by Garry Yao

Keywords: Review- removed
Resolution: fixed
Status: assignedclosed

Verified it has been fixed with #3304.

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