Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#10701 closed Bug (invalid)

Editor event "paste" no longer fires when pasting content via Ctrl+V

Reported by: Scott Rabin Owned by:
Priority: Normal Milestone:
Component: Core : Pasting Version: 4.1.3
Keywords: paste, event Cc: hhinrich@…

Description

This bug appears to be a regression introduced between tags 4.1.2 and 4.1.3. CKEditor version 4.2 also includes this bug.

When pasting content into the editor in 4.1.2, the editor will correctly fire a paste event to which functions may listen and modify the pasted content. In 4.1.3, the paste event is not fired when the users pastes via Ctrl+V and registered functions are not invoked. Pasting via the context menu "Paste" command (and consequently the displayed dialog that asks for user-originated Ctrl+V paste) still triggers the event.

Change History (3)

comment:1 Changed 11 years ago by Piotrek Koszuliński

Resolution: invalid
Status: newclosed

I had to remove previous comment, because it was incorrect.

I checked this code:

CKEDITOR.replace( 'editor1', {
	on: {
		paste: function() {
			console.log( 'paste' );
		}
	}
} );

And had no problems.

Please, provide more details on which browsers does this happen and how do you test it (sample preferably). I'm closing this ticket for now, but if we'll be able to reproduce this issue, I'll reopen it.

comment:2 Changed 10 years ago by Henning

Cc: hhinrich@… added
Version: 4.1.34.3.2

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> <!-- Make sure the path to CKEditor is correct. --> <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>

Version 0, edited 10 years ago by Henning (next)

comment:3 Changed 10 years ago by Piotrek Koszuliński

Version: 4.3.24.1.3

Please note that this ticket is about CTRL+V not SHIFT+INSERT. There needs to be a separate ticket reported for this issue, unless one already exists (though I haven't found any).

Note: See TracTickets for help on using tickets.
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy