Opened 16 years ago

Closed 11 years ago

#2079 closed Bug (invalid)

Function such as "Right Justify" affect more lines than it should

Reported by: PavelZ Owned by:
Priority: Normal Milestone:
Component: General Version: FCKeditor 2.5 Beta
Keywords: Cc: davidh@…


Environment: Both IE 6.0 and FF 2.0, Win XP

Steps (in on-line FCK demo):

  1. write:


  1. place cursor in the "bb"-line
  2. click "Right Justify" button

All lines are right justified not just the "bb"

The same problem with "Decrease Indent", "Increase Indent", "Left Justify", "Centre Justify", "Right Justify", "Block Justify"

Opposite to "Insert/Remove Numbered List" and "Insert/Remove Bulleted List" which alter only actual line

(It became more important when FCKConfig.EnterMode is set to 'br')

Change History (5)

comment:1 Changed 16 years ago by Wojciech Olchawa

Keywords: Confirmed added
Version: FCKeditor 2.6 RC

Confirmed using IE and FF2.

comment:2 Changed 15 years ago by Artur Formella

Version: FCKeditor 2.6 RCFCKeditor 2.5 Beta

#2747 has been marked as DUP.

comment:3 Changed 15 years ago by Dave

Part of the problem is in fckdomrange.js, line 694, where entermode is used to determine what range to select. That is: either the complete node (aa/bb/cc/) or just a part (bb). For fckjustifycommand.js this is a little weird (if you turn the entermode and shiftentermode around you get different behaviour when justifying even though you can generate the same html). The lines are (and after):

if ( this.StartBlock && FCKConfig.EnterMode != 'br' && unit == 'block_contents' )
  this.SetStart( this.StartBlock, 1 ) ;

The second part of the problem is that if only a part is selected to be justified then fckdomrangeiterator.js (line 271) will trigger another effect. Either a 'cloneNode' (if a parent is available) or (depending on entermode again:) a div or p is created. In the first case it should use a span tag imho (for this situation).

comment:4 Changed 15 years ago by Dave

Cc: davidh@… added

comment:5 Changed 11 years ago by Jakub Ś

Resolution: invalid
Status: confirmedclosed

This is happening because buttons mentioned in original ticket work on block level. After performing TC steps we have:

<p>aa<br />
bb<br />

which after applying e.g. indent will change into

<p style="margin-left: 40px">aa<br />
bb<br />

I understand that some may not like it but we think it is better to apply style to block than split (in this case) whole text in to 3 separate blocks and apply style to middle one.

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