Merge pull request #719 from Tyriar/718_selection_on_top

Render selection on top of rows
This commit is contained in:
Daniel Imms
2017-06-21 08:29:40 -07:00
committed by GitHub
2 changed files with 5 additions and 3 deletions
+4 -1
View File
@@ -192,11 +192,14 @@
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
z-index: 1;
opacity: 0.3;
pointer-events: none;
} }
.terminal .xterm-selection div { .terminal .xterm-selection div {
position: absolute; position: absolute;
background-color: #555; background-color: #fff;
} }
/* /*
+1 -2
View File
@@ -648,8 +648,7 @@ Terminal.prototype.open = function(parent, focus) {
this.viewportScrollArea.classList.add('xterm-scroll-area'); this.viewportScrollArea.classList.add('xterm-scroll-area');
this.viewportElement.appendChild(this.viewportScrollArea); this.viewportElement.appendChild(this.viewportScrollArea);
// Create the selection container. This needs to be added before the // Create the selection container.
// rowContainer as the selection must be below the text.
this.selectionContainer = document.createElement('div'); this.selectionContainer = document.createElement('div');
this.selectionContainer.classList.add('xterm-selection'); this.selectionContainer.classList.add('xterm-selection');
this.element.appendChild(this.selectionContainer); this.element.appendChild(this.selectionContainer);