Opened 14 years ago
Closed 14 years ago
#7304 closed Bug (fixed)
Paste from Word: cleanWord not invoked for the first time
Reported by: | Wiktor Walc | Owned by: | Garry Yao |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.5.3 |
Component: | Core : Pasting | Version: | 3.1 |
Keywords: | Firefox | Cc: | kagupta@…, satya_minnekanti@… |
Description
When using the "Paste from Word" button to paste content, the CKEDITOR.cleanWord function is not executed for the first time. Confirmed in Safari, Opera and Chrome.
Steps to reproduce
- Replace the default filter with:
CKEDITOR.cleanWord = function( data, editor ) { alert("clean word called"); return 'xyz'; }
- Open _samples/replacebyclass.html in Safari.
- Copy something, but not from Word, e.g. a part of the default text in the editor.
- Paste it using the "Paste from Word" button.
- Result: the alert message "clean word called" did not show up.
- Repeats steps 3-5. The alert message now showed up.
Attachments (4)
Change History (20)
comment:1 Changed 14 years ago by
Status: | new → confirmed |
---|
Changed 14 years ago by
Attachment: | 7304.patch added |
---|
comment:2 Changed 14 years ago by
Owner: | set to Garry Yao |
---|---|
Status: | confirmed → review |
Version: | → 3.1 |
Dialog (paste word) open doesn't always force the cleanup, not a regression though.
comment:3 Changed 14 years ago by
Cc: | satya_minnekanti@… added |
---|
comment:4 Changed 14 years ago by
Milestone: | → CKEditor 3.5.3 |
---|
comment:5 Changed 14 years ago by
Status: | review → review_failed |
---|
I'm not able to reproduce the problem with IE, Safari and Opera. It works exactly as expected.
Something is really wrong here with FF.
Having the custom cleanWord() defined in the page, with FF:
- Click the "Paste from Word" button. The alert() message is displayed and "xyz" is inserted into the editor contents (Issue 1).
- Paste something in the dialog and confirm. The alert() message is displayed again and "xyz" is inserted in the editor. This is expected.
Then after patch, always with FF, things get worst. While the above issue 1 still happens, the expected point 2 is not happening. No alert() and the original paste contents are inserted in the editor (Issue 2).
comment:6 Changed 14 years ago by
As it looks like things are a bit messed up here, it might be worth to check also #6465 while working on this ticket, perhaps it is related.
comment:7 Changed 14 years ago by
Status: | review_failed → review |
---|
comment:10 Changed 14 years ago by
Status: | review → review_failed |
---|
With this patch I'm still able to reproduce this issue in IE6 with "Security Settings" set to "Allow paste operations via script".
Changed 14 years ago by
Attachment: | 7304_2.patch added |
---|
comment:11 Changed 14 years ago by
Status: | review_failed → review |
---|
Wiktor just caught a small logic glitch in the patch with IE6.
comment:12 Changed 14 years ago by
Status: | review → review_failed |
---|
IE8, IE8 Standards mode. "Allow Programmatic clipboard access" set to Disabled. After pressing "Paste From Word" button, the cleanWord
function is immediately executed, just like in comment:5
Changed 14 years ago by
Attachment: | 7304_3.patch added |
---|
comment:13 Changed 14 years ago by
Status: | review_failed → review |
---|
Changed 14 years ago by
Attachment: | 7304_4.patch added |
---|
comment:15 Changed 14 years ago by
Status: | review → review_passed |
---|
comment:16 Changed 14 years ago by
Resolution: | → fixed |
---|---|
Status: | review_passed → closed |
Fixed with [6606].
I think the following ticket might be related: #5808.