#9970 closed Bug (duplicate)
BR mode inconsistency between versions
Reported by: | tema | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | General | Version: | 3.6.3 |
Keywords: | Cc: |
Description (last modified by )
http://nightly.ckeditor.com/13-01-20-08-51/standard/samples/plugins/enterkey/enterkey.html
Select BR mode.
Situation:
- Clear all text
- Write a line of text
- Select this line
- Click bold (first line becomes bold)
- Press enter to make a new line
- Click bold again to disable it
In 3.6.2 everything works fine, first line is still bold, new text on the new line is not bold.
However in every version after 3.6.3, including 4.x, after last step bold for the first line is removed.
It seems that the 3.6.3 behavior looks more adequate.
Change History (7)
comment:1 Changed 12 years ago by
Description: | modified (diff) |
---|---|
Status: | new → confirmed |
Version: | 4.0.1 → 3.6.3 |
comment:2 Changed 12 years ago by
Resolution: | → duplicate |
---|---|
Status: | confirmed → closed |
This is actually DUP of #9933.
@agentcooper I have moved your TC there.
comment:3 Changed 12 years ago by
If this helps, the problem is inside core/dom/range.js. I took this file from 3.6.2 and moved it to 3.6.3, everything started working as expected after rebuild.
comment:4 Changed 12 years ago by
If it works for you then ok but please note this is not good method of fixing things.
Each editor version is updated with new fixes and features. This change was made to introduce something. You got this working but all things mentioned in #9933 are broken again plus maybe some extra new things that don't go along with this revert.
comment:5 Changed 12 years ago by
Well I am still inspecting the problem.
In 3.6.3 you changed "elementBoundaryEval" (in range.js) which uses CKEDITOR.dom.walker.bogus from walker.js, which returns false for br node now.
I am thinking maybe when in br mode it should return true for every br node?
There is a line
isBogus = isBogus && parent.isBlockBoundary() && !!parent.getLast( nonEmpty );
And if br's parent is strong as mentioned in example, parent.isBlockBoundary() is obviously false.
Now all I did is patch walker.js bogus method with
if (node.is && node.is('br')) { return true; }
Could you please tell me if there is any test suite I can run?
comment:6 Changed 12 years ago by
Also #9933 seems to almost work with this fix, expect there is one additional line created.
comment:7 Changed 12 years ago by
@agentcooper sorry for not replying earlier - lots of user requests and no time for anything else.
I have added comment in #9933 to your fix. Perhaps it will point someone to the right direction. Your notes make sense but way to fix this is yet to be determined.
Problem can be reproduced in all browsers from CKEditor 3.6.3 [7392]. It occurs also in CKEditor 4.x (v4).