mirror of
https://git.proxmox.com/git/mirror_xterm.js
synced 2025-10-25 16:34:33 +00:00
Support focus class on the .xterm element
This commit is contained in:
parent
fc7b22dc48
commit
aaedcfc700
@ -43,7 +43,7 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.terminal:focus {
|
||||
.terminal.focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
@ -57,11 +57,11 @@
|
||||
* HACK: to fix IE's blinking cursor
|
||||
* Move textarea out of the screen to the far left, so that the cursor is not visible.
|
||||
*/
|
||||
text-indent: -9999em;
|
||||
/*text-indent: -9999em;
|
||||
opacity: 0;
|
||||
width: 0;
|
||||
height: 0;
|
||||
z-index: -10;
|
||||
z-index: -10;*/
|
||||
}
|
||||
|
||||
.terminal .terminal-cursor {
|
||||
@ -69,13 +69,13 @@
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.terminal:not(:focus) .terminal-cursor {
|
||||
.terminal:not(.focus) .terminal-cursor {
|
||||
outline: 1px solid #fff;
|
||||
outline-offset: -1px;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.terminal:focus .terminal-cursor.blinking {
|
||||
.terminal.focus .terminal-cursor.blinking {
|
||||
animation: blink-cursor 1.2s infinite step-end;
|
||||
}
|
||||
|
||||
|
||||
@ -442,6 +442,7 @@
|
||||
this.send('\x1b[I');
|
||||
}
|
||||
|
||||
this.element.classList.add('focus');
|
||||
this.showCursor();
|
||||
this.textarea.focus();
|
||||
Terminal.focus = this;
|
||||
@ -474,6 +475,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
this.element.classList.remove('focus');
|
||||
this.cursorState = 0;
|
||||
this.refresh(this.y, this.y);
|
||||
this.textarea.blur();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user