Opened 12 years ago
Closed 11 years ago
#10190 closed Bug (fixed)
Removing block style by editor.removeStyle should result in paragraph not div
Reported by: | Piotrek Koszuliński | Owned by: | Marek Lewandowski |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 4.4.0 |
Component: | Core : Styles | Version: | 4.0 Beta |
Keywords: | Cc: | hello@… |
Description
- Open replacebyclass sample.
- Focus editor and place caret in the header (h1).
- Paste this in the console:
CKEDITOR.instances.editor1.removeStyle( new CKEDITOR.style( { element: 'h1' } ) );
- Expected result: h1 was removed, so "Apollo 11" should be a paragraph, because enterMode=P
- Actual:
<div>Apollo 11</div>
This behaviour should be enterMode aware - in div mode it should transform element to <div>
, in br mode it should remove it completely.
Change History (10)
comment:1 Changed 12 years ago by
Cc: | hello@… added |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 12 years ago by
I replied for your pull request:
https://github.com/ckeditor/ckeditor-dev/pull/33#issuecomment-14835366
Unfortunately your patch isn't correct, but now we at least know that style was aware of enter mode.
comment:4 Changed 12 years ago by
Yes, you have right. There should be an other solution. For now and for me this was good, but your developpers will decide how to correclt handle this problem. Thanks for the help!
comment:5 Changed 12 years ago by
Status: | new → confirmed |
---|---|
Version: | → 4.0 Beta |
Problem can be reproduced in all browsers from CKEditor 4 beta.
comment:6 Changed 11 years ago by
Milestone: | → CKEditor 4.4 |
---|---|
Owner: | set to Piotrek Koszuliński |
Status: | confirmed → assigned |
comment:7 Changed 11 years ago by
Owner: | changed from Piotrek Koszuliński to Marek Lewandowski |
---|
comment:8 Changed 11 years ago by
Status: | assigned → review |
---|
Pushed to t/10190 at dev and t/10190 at tests.
comment:9 Changed 11 years ago by
Status: | review → review_passed |
---|
I pushed rebased and corrected branches.
comment:10 Changed 11 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with git:c1cc4d2dc1 (merged to major) at dev and 0c6fc1b635 (merged to major) at tests.
I think the problem comes from the style.js where the this._.enterMode is not defined.
Doing this, resolve the problem: