Opened 17 years ago
Closed 12 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@… |
Description
Environment: Both IE 6.0 and FF 2.0, Win XP
Steps (in on-line FCK demo):
- write:
aa
<Shift+Enter>
bb
<Shift+Enter>
cc
- place cursor in the "bb"-line
- 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 17 years ago by
Keywords: | Confirmed added |
---|---|
Version: | → FCKeditor 2.6 RC |
comment:2 Changed 16 years ago by
Version: | FCKeditor 2.6 RC → FCKeditor 2.5 Beta |
---|
#2747 has been marked as DUP.
comment:3 Changed 16 years ago by
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 16 years ago by
Cc: | davidh@… added |
---|
comment:5 Changed 12 years ago by
Resolution: | → invalid |
---|---|
Status: | confirmed → closed |
This is happening because buttons mentioned in original ticket work on block level. After performing TC steps we have:
<p>aa<br /> bb<br /> cc</p>
which after applying e.g. indent will change into
<p style="margin-left: 40px">aa<br /> bb<br /> cc</p>
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.
Confirmed using IE and FF2.