Opened 15 years ago
Closed 14 years ago
#5455 closed Bug (fixed)
we can't remove the format of the copied & pasted text by selecting the text and clicking on Formatted icon
Reported by: | Satya Minnekanti | Owned by: | Frederico Caldeira Knabben |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.4 |
Component: | Core : Styles | Version: | 3.0 |
Keywords: | IBM | Cc: | Damian, joek |
Description
To reproduce the defect:
- Open Ajax sample.
- Type few lines of text.
- Apply Bold Formatting to the text in the First line.
- Copy the Formatted text in the first line and Paste it at the end of last line.
- Select the Pasted text and see that the Bold icon in Toolbar is highlighted.
- Click on Bold Icon.
Expected Result:
Bold Format applied to the text is removed
Actual Result:
Bold Format applied to the text is not removed.
We can remove the format using only the following two ways.
Go to HTML Source and Come back to WYSIWYG mode and select the text again and click Bold icon or
Select the Pasted text and Click on Remove Format Icon.
Same behaviour happens with Italic,Underline,Strike Through,Subscript and Superscript formatting options.
Tested against FF3,IE 6&7
Attachments (6)
Change History (22)
comment:1 Changed 15 years ago by
Keywords: | Confirmed added |
---|---|
Milestone: | CKEditor 3.3 → CKEditor 3.4 |
Version: | 3.2 → 3.0 |
comment:2 Changed 15 years ago by
Owner: | set to brooks |
---|---|
Status: | new → assigned |
Changed 15 years ago by
Attachment: | 5455.patch added |
---|
comment:4 Changed 15 years ago by
Keywords: | review? added |
---|
Changed 15 years ago by
Attachment: | 5455_2.patch added |
---|
Changed 15 years ago by
Attachment: | 5455_3.patch added |
---|
comment:6 Changed 15 years ago by
Keywords: | Discussion review- added; Confirmed review? removed |
---|
The patch doesn't work when both attributes present on element.
On the other hands, I think our styles system is doing wrong in this sense, though we have kept it for a long time since v2, e.g. user put a class attribute on the strong element could easily break the style removing, which doesn't make sense.
Changed 15 years ago by
Attachment: | 5455_4.patch added |
---|
comment:7 Changed 15 years ago by
Component: | General → Core : Styles |
---|
Proposing a solution to have it discussed.
comment:8 Changed 14 years ago by
Keywords: | Review? added; review- removed |
---|
comment:9 Changed 14 years ago by
Owner: | changed from brooks to Garry Yao |
---|---|
Status: | assigned → new |
comment:10 Changed 14 years ago by
Keywords: | Review- added; Review? removed |
---|
The proposed approach is wrong, because now we'll leave an empty <span> when removing the bold formatting, just because of the presence of the _cke_expando attribute.
We need to check where we're using element.hasAttributes(), but maybe we can make it ignore the _cke_expando attribute. In that case the change would be much simpler and safer.
Changed 14 years ago by
Attachment: | 5455_5.patch added |
---|
comment:11 Changed 14 years ago by
Keywords: | Discussion removed |
---|---|
Owner: | changed from Garry Yao to Sa'ar Zac Elias |
Status: | review_failed → review |
The patch makes the hasAttributes method to ignore the _moz_dirty attribute, as well as adds Garry's solution.
comment:12 Changed 14 years ago by
Status: | review → review_failed |
---|
Having or not to handle removal of styles partially valid for the selection, replacing them with <span>, is something out of the scope of this ticket, and needs discussions, together with a real world test case.
comment:13 Changed 14 years ago by
Owner: | changed from Sa'ar Zac Elias to Frederico Caldeira Knabben |
---|---|
Status: | review_failed → assigned |
Changed 14 years ago by
Attachment: | 5455_6.patch added |
---|
comment:15 Changed 14 years ago by
Status: | review → review_passed |
---|
Filed #6026 to discuss Garry's proposal.
comment:16 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [5741].
Confirmed with CKEditor 3.0.