From 473d45f425d8bb81b19d5b6fd641bd20ed084fd2 Mon Sep 17 00:00:00 2001 From: paris Date: Tue, 8 Apr 2014 09:39:27 +0000 Subject: [PATCH] Copy and Paste seem to work. --- src/xterm.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/xterm.js b/src/xterm.js index da415076..de43f61d 100644 --- a/src/xterm.js +++ b/src/xterm.js @@ -416,10 +416,12 @@ Terminal.prototype.initGlobal = function() { */ Terminal.bindPaste = function(term) { on([term.textarea, term.element], 'paste', function(ev) { + ev.stopPropagation(); if (ev.clipboardData) { - term.send(ev.clipboardData.getData('text/plain')); - } else if (term.context.clipboardData) { - term.send(term.context.clipboardData.getData('Text')); + var text = ev.clipboardData.getData('text/plain'); + for (var i=0; i