Ticket #5439 (closed Bug: worksforme)

Opened 5 years ago

Last modified 4 years ago

Unable to align selected text in a table

Reported by: wwalc Owned by: Saare
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

5439.patch (676 bytes) - added by Saare 4 years ago.

Change History

comment:1 Changed 5 years ago by fredck

  • Milestone set to CKEditor 3.4

comment:2 Changed 4 years ago by brooks

  • Owner set to brooks
  • Status changed from new to assigned

confirmed in Firefox & IE & Chrome

comment:3 Changed 4 years ago by brooks

  • Status changed from assigned to new
  • Owner brooks deleted

Changed 4 years ago by Saare

comment:4 Changed 4 years ago by Saare

  • Owner set to Saare
  • Status changed from new to assigned

comment:5 Changed 4 years ago by Saare

  • Keywords Review? added

comment:6 Changed 4 years ago by fredck

  • Status changed from review to review_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 4 years ago by Saare

  • Keywords Confirmed removed

I can no longer reproduce the bug on trunk.

comment:8 Changed 4 years ago by fredck

  • Status changed from review_failed to closed
  • Resolution set to worksforme
  • Milestone CKEditor 3.4 deleted

Yes, it's working well now on trunk.

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