The cut, copy, and paste events fire when the user cuts, copies or pastes a text or image.
Test | IE 5.5 | IE 6 | IE 7 | IE8 | IE9 | IE10 pr2 | FF 7.0 Win | FF 6.1 Mac | Saf 5.1 Win | Saf 5.1 Mac | Chrome 14 Win | Chrome 13 Mac | Opera 11.51 Win | Opera 11.51 Mac |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
On the window
|
No | Incom |
Yes | Incom |
Incom |
Incom |
No | |||||||
|
||||||||||||||
On the document
|
No | Incom |
Yes | Lazy | Yes | Lazy | No | |||||||
|
||||||||||||||
On forms
|
Yes | Yes | Lazy | Yes | Lazy | No | ||||||||
|
||||||||||||||
On text inputs
|
Yes | Yes | Lazy | Yes | Lazy | No | ||||||||
|
||||||||||||||
Test | IE 5.5 | IE 6 | IE 7 | IE8 | IE9 | IE10 pr2 | FF 7.0 Win | FF 6.1 Mac | Saf 5.1 Win | Saf 5.1 Mac | Chrome 14 Win | Chrome 13 Mac | Opera 11.51 Win | Opera 11.51 Mac |
On images
When you go to the context menu and select 'Copy image' or a similar command. |
Yes | No | No | No | No | |||||||||
On any element
In general only the copy event should be available, since it's not possible to cut or paste text from or to, say, a paragraph. |
Yes | Yes | Lazy | Yes | Lazy | No | ||||||||
|
||||||||||||||
Prevent default
The point of these events: can you prevent a cut, copy or paste action from taking place? |
Yes | Yes | Almost | Yes | Untest |
|||||||||
|
||||||||||||||
Event bubbling
These events should bubble up. |
Yes | Yes | Yes | Yes | Untest |
|||||||||
Cancel bubble
|
Yes | Yes | Yes | Yes | Untest |
|||||||||
Test | IE 5.5 | IE 6 | IE 7 | IE8 | IE9 | IE10 pr2 | FF 7.0 Win | FF 6.1 Mac | Saf 5.1 Win | Saf 5.1 Mac | Chrome 14 Win | Chrome 13 Mac | Opera 11.51 Win | Opera 11.51 Mac |
Lazy implementation: the browser fires these events whenever the user presses the Cut, Copy, or Paste shortcut keys, whether that action makes sense in a given context or not.
For instance, when you press [Ctrl | Cmd]+X while the focus is nowhere in particular and you have not selected any text, some browsers will fire a cut event, even though there's nothing to cut.
This is a very odd bug, in that it’s an old one in Firefox but solved in FF4, but new in Safari and Chrome. Safari 3 and Chrome 1 did not have this bug and implemented the events correctly, but newer versions do have the bug.