[CKEditor Dev] #11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9

270 views
Skip to first unread message

CKEditor

unread,
May 16, 2014, 8:02:20 AM5/16/14
to ckeditor...@googlegroups.com
#11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9
--------------------------------------+-------------------
Reporter: Henning | Type: Bug
Status: new | Priority: Normal
Component: General | Version: 4.3.2
Keywords: paste, insert, clipboard |
--------------------------------------+-------------------
I don't get CKEditor's 'paste' event fired when pasting with SHIFT+INS
using
* Internet Explorer 9
* CKEditor 4.3.2
FF and Chrome fire the paste event.

See the small example code below. Paste alert is not displayed.

Browsing thru clipboard\plugin.js, this seems to be a complex matter. I do
get the paste event in IE9 when removing the following line from the onKey
function, but cannot oversee the side effects of this:
case CKEDITOR.SHIFT + 45: // SHIFT+INS


----

{{{
<!DOCTYPE html>
<html>
<head>
<title>A Simple Page with CKEditor</title>
<script src="ckeditor/ckeditor.js"></script>
</head>
<body>
<form>
<textarea id="editor1" name="editor1" rows="10" cols="80">
This is my textarea to be replaced with CKEditor.
</textarea>
<script>
// Replace the <textarea id="editor1"> with a CKEditor
// instance, using default configuration.
var myEditor = CKEDITOR.replace('editor1');
myEditor.on('paste', function (evt) {
alert("paste 1");
});
</script>
</form>
</body>
</html>

}}}

--
Ticket URL: <http://dev.ckeditor.com/ticket/11970>
CKEditor <http://ckeditor.com/>
The text editor for the Internet

CKEditor

unread,
May 27, 2014, 10:46:23 AM5/27/14
to ckeditor...@googlegroups.com
#11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9
----------------------+-----------------------
Reporter: Henning | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:
Component: General | Version: 4.0 Beta
Resolution: | Keywords: IE
----------------------+-----------------------
Changes (by j.swiderski):

* keywords: paste, insert, clipboard => IE
* status: new => confirmed
* version: 4.3.2 => 4.0 Beta


Comment:

I see this somewhat works in CKEditor 3.6.6 - when you use SHIFT+Insert,
browser asks if it should allow clipboard access. If you click allow you
will get text pasted and alert box shown.

Starting from CKEditor 4.0 beta, content is pasted but no alert box is
shown what means that paste event is not captured for SHIFT+Insert on IE.

Someone on SO had same problem:
http://stackoverflow.com/questions/19269234/ckeditor-capturing-on-paste-
event-including-shift-insert

--
Ticket URL: <http://dev.ckeditor.com/ticket/11970#comment:1>

CKEditor

unread,
Jun 2, 2014, 9:41:52 AM6/2/14
to ckeditor...@googlegroups.com
#11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9
----------------------+-----------------------
Reporter: Henning | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:
Component: General | Version: 4.0 Beta
Resolution: | Keywords: IE
----------------------+-----------------------

Comment (by j.swiderski):

This workaround mentioned on SO really seems to work:
{{{
editor.on('key', function(ev) {
if (ev.data.keyCode == 2228269 &&
CKEDITOR.env.ie) {
setTimeout(function() {
var event = {
'type': 'html',
'dataValue':
editor.getData()
};
editor.editable().setHtml('');
editor.fire('paste',
event);
}, 100);
}
});

editor.on('paste', function(ev) {
alert('we are in the on paste event!');
});
}}}

--
Ticket URL: <http://dev.ckeditor.com/ticket/11970#comment:2>

CKEditor

unread,
Jul 17, 2014, 5:51:31 AM7/17/14
to ckeditor...@googlegroups.com
#11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9
----------------------+------------------------

Reporter: Henning | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:
Component: General | Version: 4.0 Beta
Resolution: | Keywords: IE Support
----------------------+------------------------
Changes (by wwalc):

* keywords: IE => IE Support


--
Ticket URL: <http://dev.ckeditor.com/ticket/11970#comment:3>

CKEditor

unread,
Jul 17, 2014, 6:15:52 AM7/17/14
to ckeditor...@googlegroups.com
#11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9
----------------------+------------------------
Reporter: Henning | Owner:
Type: Bug | Status: confirmed
Priority: Normal | Milestone:
Component: General | Version: 4.0 Beta
Resolution: | Keywords: IE Support
----------------------+------------------------

Comment (by Henning):

The workaround is ok when you just want to get a paste event at some point
of time. It is not sufficient if you want to use undo and paste features
provided by other plugins, because the workarounded paste event fires too
late.
Hence we decided to cancel the SHIFT+INS key event, and must use CTRL+V
instead, which, however, is not _nice_.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11970#comment:4>

CKEditor

unread,
Jul 17, 2014, 8:00:49 AM7/17/14
to ckeditor...@googlegroups.com
#11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9
----------------------+------------------------
Reporter: Henning | Owner: pjasiun
Type: Bug | Status: review

Priority: Normal | Milestone:
Component: General | Version: 4.0 Beta
Resolution: | Keywords: IE Support
----------------------+------------------------
Changes (by pjasiun):

* owner: => pjasiun
* status: confirmed => review


Comment:

The reason of the issue it this fix: https://github.com/ckeditor/ckeditor-
dev/blob/master/plugins/clipboard/plugin.js#L471-L472

I've fixed it and pushed changes to [https://github.com/cksource/ckeditor-
dev/commits/t/11970 t/11970].

--
Ticket URL: <http://dev.ckeditor.com/ticket/11970#comment:5>

CKEditor

unread,
Jul 18, 2014, 10:23:43 AM7/18/14
to ckeditor...@googlegroups.com
#11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9
----------------------+------------------------
Reporter: Henning | Owner: pjasiun
Type: Bug | Status: review
Priority: Normal | Milestone:
Component: General | Version: 4.0 Beta
Resolution: | Keywords: IE Support
----------------------+------------------------

Comment (by jbalinski):

I applied the fix that was committed and it appears to resolve the issue.
I've tested it out on IE8 and IE11.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11970#comment:6>

CKEditor

unread,
Jul 25, 2014, 5:50:11 AM7/25/14
to ckeditor...@googlegroups.com
#11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9
----------------------+----------------------------
Reporter: Henning | Owner: pjasiun
Type: Bug | Status: review_passed
Priority: Normal | Milestone: CKEditor 4.4.4

Component: General | Version: 4.0 Beta
Resolution: | Keywords: IE Support
----------------------+----------------------------
Changes (by Reinmar):

* status: review => review_passed
* milestone: => CKEditor 4.4.4


Comment:

@pjasiun: Comment in the code must be added.

--
Ticket URL: <http://dev.ckeditor.com/ticket/11970#comment:7>

CKEditor

unread,
Jul 25, 2014, 10:45:17 AM7/25/14
to ckeditor...@googlegroups.com
#11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9
----------------------+----------------------------
Reporter: Henning | Owner: pjasiun
Type: Bug | Status: closed

Priority: Normal | Milestone: CKEditor 4.4.4
Component: General | Version: 4.0 Beta
Resolution: fixed | Keywords: IE Support
----------------------+----------------------------
Changes (by pjasiun):

* status: review_passed => closed
* resolution: => fixed


Comment:

Comment added and ticket masterized (git:7c0da96).

--
Ticket URL: <http://dev.ckeditor.com/ticket/11970#comment:8>

CKEditor

unread,
Jul 28, 2014, 11:13:58 AM7/28/14
to ckeditor...@googlegroups.com
#11970: CKEditor paste event not fired when pasting with SHIFT+INS in IE9
----------------------+----------------------------
Reporter: Henning | Owner: pjasiun
Type: Bug | Status: closed
Priority: Normal | Milestone: CKEditor 4.4.4
Component: General | Version: 4.0 Beta
Resolution: fixed | Keywords: IE Support
----------------------+----------------------------

Comment (by Henning):

Thanks a lot! We'll try when we update to >= 4.4.4

--
Ticket URL: <http://dev.ckeditor.com/ticket/11970#comment:9>

Reply all
Reply to author
Forward
0 new messages