Opened 16 years ago
Closed 16 years ago
#3356 closed Bug (fixed)
Ident problem with nested block
Reported by: | Garry Yao | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.0 |
Component: | General | Version: | |
Keywords: | Confirmed Review+ | Cc: |
Description
Reproducing Procedures
- Open the replace by class example page;
- Make the following content along with selection:
^<div> text <p> paragraph </p> </div>^
- Click on 'Increase Indent' command;
- Expected Result:
<div style="margin-left: 40px;"> <p> text </p> <p> paragraph </p> </div>
- Actual Result: Javascript error thrown.
<div> <p> text </p> <p> paragraph </p> </div>
- Expected Result:
Attachments (1)
Change History (7)
comment:1 Changed 16 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | new → assigned |
comment:2 Changed 16 years ago by
Summary: | Ident problem with pseudo block → Ident problem with nested block |
---|
Changed 16 years ago by
Attachment: | 3356.patch added |
---|
comment:3 Changed 16 years ago by
Keywords: | Review? added |
---|
The substree examination logic will prevent nested block from been indented which happened always.
comment:4 Changed 16 years ago by
I'll have Martin to help reviewing this ticket to see if the removed lines has impact on other tickets.
comment:5 Changed 16 years ago by
Keywords: | Review+ added; Review? removed |
---|
The original commonParents code, ported from v2, was supposed to handle case like this:
<div id="div1"> fdasjkfldasjkflsdadsa <div id="div2"> jdaslfjlsa <div id="div3"> fsdja <div> fdsjalkfjasdk <div> fdjaklfjasd</div> lsdkflsadl</div> fldjsklfjsadfsd</div> fjdjdas </div> fdjaskfldajkfsd </div>
The problem at that time was that the dom iterator would report div1 and div2 and div3 as separate paragraphs. So indenting with div1 selected would mean div1 is indented 40px, div2 is indented 40px + 40px = 80px and div 3 is indented 40px * 3 = 120px.
Now this is no longer happening with the dom iterator, as the dom iterator can now correctly separate the things between div1 and div2, and div2 and div3 into new paragraphs. So it would make sense to ignore the common parent node and indent them all. So it's correct to remove the common parent checking logic.
Review+
comment:6 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
The problem happened on all nested blocks, the input of this TC could be simplified to: