Opened 13 years ago
Last modified 9 years ago
#8369 closed Bug
Unable to unbold text that has inline style — at Version 9
Reported by: | Michael Camden | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | Core : Styles | Version: | 3.6 |
Keywords: | Cc: | mcamden@… |
Description (last modified by )
I've confirmed this in Chrome on Windows 7, not sure of other browsers. If text is bolded using the strong tag, and has an inline style, it cannot be unbolded.
Steps to reproduce:
- Goto ckeditor.com/demo and clear out the content
- Press the 'source' button, and insert the following html:
<p>
<strong style="color:#40e0d0;">The quick brown fox.</strong></p>
- Press the 'source' button again to enter WYSIWYG mode.
- Select the text 'The quick brown fox' and press the 'bold' button. The text will not be unbolded.
UPDATE: Both original issue and the one from comment:5 can be reproduced
Change History (9)
comment:1 Changed 13 years ago by
Keywords: | chrome unbold removed |
---|---|
Status: | new → confirmed |
Summary: | Chrome - Unable to unbold text that has inline style → Unable to unbold text that has inline style |
Version: | 3.6 → 3.0 |
comment:2 Changed 13 years ago by
I have a possible patch for this bug.
File: _source/plugins/styles/plugin.js Line: 1158
// If the style attributes defined don't apply to this style element, convert to span if(removeEmpty && !styles && element.hasAttributes() && element.getAttribute('style')) { element.renameNode('span'); }
This patch works with the following test cases;
<p> <strong>Bolded text with no other style applied</strong> </p> <p> <strong style="color: red">Bolded text with a red color style</strong> </p> <p> <strong><span style="color: red">Bolded text with red color style in span</span></strong> </p>
This patch should also resolve similar bugs with other style elements like 'em'. In fact, in my testing the following similar test cases are also work:
<p> <em>Italic text with no other style applied</em> </p> <p> <em style="color: red">Italic text with a red color style</em> </p> <p> <em><span style="color: red">Italic text with red color style in span</span></em> </p>
comment:3 Changed 12 years ago by
comment:4 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | confirmed → closed |
This is no longer an issue in CKEditor 4.x. I have tested this in latest CKE 4.1 and unbolding worked as expected.
comment:5 Changed 12 years ago by
This bug is NOT fixed in the latest CKE 4.1.1 (at the time of this writing). You can reproduce it on the demo page as follows:
- Clear all the text
- Change the format to Normal
- Type in 3 headings with an empty paragraph below them like:
H1
H2
H3
- Bold each heading
- Put your cursor in front of H2, shift + arrow up, arrow, up to select H1.
- Delete the selected test
- Put your cursor at the end of H2, hit enter
- Type something, notice it is bold.
- Try to unbold the text you just typed
RESULT: It refuses to unbold.
NOTE: If you click the "Source" button, then switch back to WYSIWYG, it will start working. This appears to be why the original steps to reproduce in the op's post work now. But in fact, the bug is not completely fixed.
comment:6 Changed 12 years ago by
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:7 Changed 12 years ago by
Status: | reopened → confirmed |
---|---|
Version: | 3.0 → 3.5.3 |
comment:8 Changed 12 years ago by
Any update on this issue? It's a pretty severe problem for our clients.
Thanks.
comment:9 Changed 12 years ago by
Description: | modified (diff) |
---|
Issue has been reproducible in all browsers from CKEditor 3.0.