temporarily re-enable selection even when the terminal registers interest in order to fix copy/paste

This commit is contained in:
Guillermo Rauch 2016-10-15 16:40:12 -05:00
parent 428eba7258
commit f96d02480d

View file

@ -207,26 +207,6 @@ hterm.Terminal.prototype.onMouse_ = function (e) {
return oldOnMouse.call(this, e);
};
// since above we're no longer relying on `preventDefault`
// to avoid selections, we use css instead, so that
// focus is not lost, but selections are still not possible
// when the appropiate VT mode is set
hterm.VT.prototype.__defineSetter__('mouseReport', function (val) {
this.mouseReport_ = val;
const rowNodes = this.terminal.scrollPort_.rowNodes_;
if (rowNodes) {
if (val === this.MOUSE_REPORT_DISABLED) {
rowNodes.style.webkitUserSelect = 'text';
} else {
rowNodes.style.webkitUserSelect = 'none';
}
}
});
hterm.VT.prototype.__defineGetter__('mouseReport', function () {
return this.mouseReport_;
});
// fixes a bug in hterm, where the shorthand hex
// is not properly converted to rgb
lib.colors.hexToRGB = function (arg) {