Opened 8 years ago

Closed 7 years ago

#5439 closed Bug (worksforme)

Unable to align selected text in a table

Reported by: Wiktor Walc Owned by: Sa'ar Zac Elias
Priority: Normal Milestone:
Component: General Version: 3.0.2
Keywords: Cc:

Description

The alignment options do not work inside of a table cell if the content (text, image) is selected. Confirmed in FF 3.6.2 and IE 8. It was working correctly until 3.0.1.

Steps to repoduce

  • Start with the following source
    <table border="1" cellpadding="1" cellspacing="1" style="width: 600px">
    	<tbody>
    		<tr>
    			<td>
    				one</td>
    			<td>
    				two</td>
    		</tr>
    		<tr>
    			<td>
    				three</td>
    			<td>
    				four</td>
    		</tr>
    	</tbody>
    </table>
    
  • Switch to wysiwyg mode, select "one"
  • Click on the "Right Justify" button
  • result: text is not aligned to the right.

Attachments (1)

5439.patch (676 bytes) - added by Sa'ar Zac Elias 7 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.4

comment:2 Changed 8 years ago by brooks

Owner: set to brooks
Status: newassigned

confirmed in Firefox & IE & Chrome

comment:3 Changed 7 years ago by brooks

Owner: brooks deleted
Status: assignednew

Changed 7 years ago by Sa'ar Zac Elias

Attachment: 5439.patch added

comment:4 Changed 7 years ago by Sa'ar Zac Elias

Owner: set to Sa'ar Zac Elias
Status: newassigned

comment:5 Changed 7 years ago by Sa'ar Zac Elias

Keywords: Review? added

comment:6 Changed 7 years ago by Frederico Caldeira Knabben

Status: reviewreview_failed

It's the job of the iterator to retrieve the proper paragraph on first call. It looked strange the change to simply take the startContainer, and I was able to easily prove why it's wrong with this:

  1. Load this HTML:
<p><strong>Some bold text</strong></p>
  1. Select the word "bold".
  2. Click the "right align" button.

In the source view, you can notice that the <strong> element got the "text-align: right;" style, which is wrong.

The thing to be fixed is being sure that getNextParagraph() will return the right thing in that case.

comment:7 Changed 7 years ago by Sa'ar Zac Elias

Keywords: Confirmed removed

I can no longer reproduce the bug on trunk.

comment:8 Changed 7 years ago by Frederico Caldeira Knabben

Milestone: CKEditor 3.4
Resolution: worksforme
Status: review_failedclosed

Yes, it's working well now on trunk.

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