Ensure host program handles copy if mouseevents are active

This commit is contained in:
Daniel Imms
2017-06-07 11:20:03 -07:00
parent 9a86eeb333
commit 72724abac8
+6 -1
View File
@@ -526,7 +526,12 @@ Terminal.prototype.initGlobal = function() {
// Bind clipboard functionality
on(this.element, 'copy', event => {
copyHandler(event, term, term.selectionManager);
// If mouse events are active it means the selection manager is disabled and
// copy should be handled by the host program.
if (this.mouseEvents) {
return;
}
copyHandler(event, term, this.selectionManager);
});
const pasteHandlerWrapper = event => pasteHandler(event, term);
on(this.textarea, 'paste', pasteHandlerWrapper);