Opened 11 years ago

Closed 11 years ago

#3091 closed Bug (fixed)

plugin:font change font cross table incorrect

Reported by: Garry Yao Owned by: Frederico Caldeira Knabben
Priority: Must have (possibly next milestone) Milestone: CKEditor 3.0
Component: General Version: SVN (FCKeditor) - Retired
Keywords: Confirmed Review+ Cc:

Description

Procedures

  1. Open the replace by code example page;
  2. Initial the document with the following content and selection:
    ^outter<table><tr><td>text</td></tr></table>outter^
    
  3. Apply different fonts three times with the same range.
  • Actual Result : The document result in:
    <span style="font-family: Courier New,Courier,monospace;">outter</span>
    <table>
    	<tbody>
    		<tr>
    			<td>
    				<span style="font-family: Courier New,Courier,monospace;">text</span></td>
    		</tr>
    	</tbody>
    </table>
    <table>
    	<tbody>
    		<tr>
    			<td>
    			</td>
    		</tr>
    	</tbody>
    </table>
    <span style="font-family: Courier New,Courier,monospace;">outter</span>
    

Attachments (3)

test-font.patch (5.1 KB) - added by Garry Yao 11 years ago.
Unit Test Case
3091.patch (2.3 KB) - added by Garry Yao 11 years ago.
3091_2.patch (5.2 KB) - added by Frederico Caldeira Knabben 11 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 11 years ago by Garry Yao

I've tested solely with style system which shows no bug, perhaps the bug comes from selection system, just guess.

Changed 11 years ago by Garry Yao

Attachment: test-font.patch added

Unit Test Case

comment:2 in reply to:  1 Changed 11 years ago by Garry Yao

Keywords: Confirmed added
Summary: plugin:font not correct after apply multiple timesplugin:font change font cross table incorrect

Replying to garry.yao:

I've tested solely with style system which shows no bug, perhaps the bug comes from selection system, just guess.

The bug was actually caused by the style system proved by the attached unit test file.

comment:3 Changed 11 years ago by Frederico Caldeira Knabben

Priority: NormalHigh

comment:4 Changed 11 years ago by Garry Yao

Owner: set to Garry Yao
Status: newassigned

Changed 11 years ago by Garry Yao

Attachment: 3091.patch added

comment:5 Changed 11 years ago by Garry Yao

Keywords: Review? added

The problem was due to the invoke to removeFromInsideElement on line 438 will probably remove the startNode which is used as a reference for judging whether an inline element is inside the range.

comment:6 Changed 11 years ago by Frederico Caldeira Knabben

Keywords: Review- added; Review? removed
Owner: changed from Garry Yao to Frederico Caldeira Knabben
Status: assignednew

This patch breaks several tests at "_source/tests/plugins/styles/styles.html".

I have investigated this issue a lot today and found out that the culprit is a feature I've introduced when porting the style system from V2.

Changed 11 years ago by Frederico Caldeira Knabben

Attachment: 3091_2.patch added

comment:7 Changed 11 years ago by Frederico Caldeira Knabben

Keywords: Review? added; Review- removed

comment:8 Changed 11 years ago by Garry Yao

Keywords: Review+ added; Review? removed

The patch resolve the issue in another simple way.

comment:9 Changed 11 years ago by Frederico Caldeira Knabben

Resolution: fixed
Status: newclosed

Fixed with [3311].

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