Support clipboardData in IE
Use the `clipboardData` object available on `window`, if it's not available on the event object. This allows us to support including the `clipboardData` in cut/copy/paste events in IE.
Isaac Salier-Hellendag committed
Jan 2, 2014 at 19:44 UTC
29190a2c7991be71a59676967a6e2e241afddfb5
1 file changed
+7
-1
src/event/synthetic/SyntheticClipboardEvent.js
+7
-1
@@ -26,7 +26,13 @@ var SyntheticEvent = require('SyntheticEvent');
26
* @see http://www.w3.org/TR/clipboard-apis/
27
*/
28
var ClipboardEventInterface = {
29
- clipboardData: null
29
+ clipboardData: function(event) {
30
+ return (
31
+ 'clipboardData' in event ?
32
+ event.clipboardData :
33
+ global.clipboardData
34
+ );
35
+ }
36
};
37
38
/**