mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
listen for paste event on window.
This commit is contained in:
+3
-1
@@ -675,7 +675,9 @@ Terminal.prototype.open = function(parent) {
|
||||
|
||||
// This seems to work well for ctrl-V and middle-click,
|
||||
// even without the contentEditable workaround.
|
||||
on(this.element, 'paste', function(ev) {
|
||||
// TODO Move this to initGlobal.
|
||||
on(this.context, 'paste', function(ev) {
|
||||
if (Terminal.focus !== self) return;
|
||||
if (ev.clipboardData) {
|
||||
self.send(ev.clipboardData.getData('text/plain'));
|
||||
} else if (self.context.clipboardData) {
|
||||
|
||||
Reference in New Issue
Block a user