💄
This commit is contained in:
@@ -70,7 +70,6 @@ export function moveTextAreaUnderMouseCursor(ev: MouseEvent, textarea: HTMLTextA
|
|||||||
const top = ev.clientY - pos.top - 10;
|
const top = ev.clientY - pos.top - 10;
|
||||||
|
|
||||||
// Bring textarea at the cursor position
|
// Bring textarea at the cursor position
|
||||||
textarea.style.position = 'absolute';
|
|
||||||
textarea.style.width = '20px';
|
textarea.style.width = '20px';
|
||||||
textarea.style.height = '20px';
|
textarea.style.height = '20px';
|
||||||
textarea.style.left = `${left}px`;
|
textarea.style.left = `${left}px`;
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ export class Terminal extends CoreTerminal implements ITerminal {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private _syncTextArea(): void {
|
private _syncTextArea(): void {
|
||||||
if (!this.buffer.isCursorInViewport || this._compositionHelper!.isComposing) {
|
if (!this.textarea || !this.buffer.isCursorInViewport || this._compositionHelper!.isComposing) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,13 +292,12 @@ export class Terminal extends CoreTerminal implements ITerminal {
|
|||||||
|
|
||||||
// Sync the textarea to the exact position of the composition view so the IME knows where the
|
// Sync the textarea to the exact position of the composition view so the IME knows where the
|
||||||
// text is.
|
// text is.
|
||||||
this.textarea!.style.position = 'absolute';
|
this.textarea.style.left = cursorLeft + 'px';
|
||||||
this.textarea!.style.left = cursorLeft + 'px';
|
this.textarea.style.top = cursorTop + 'px';
|
||||||
this.textarea!.style.top = cursorTop + 'px';
|
this.textarea.style.width = this._charSizeService!.width + 'px';
|
||||||
this.textarea!.style.width = this._charSizeService!.width + 'px';
|
this.textarea.style.height = cellHeight + 'px';
|
||||||
this.textarea!.style.height = cellHeight + 'px';
|
this.textarea.style.lineHeight = cellHeight + 'px';
|
||||||
this.textarea!.style.lineHeight = cellHeight + 'px';
|
this.textarea.style.zIndex = '-5';
|
||||||
this.textarea!.style.zIndex = '-5';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -207,7 +207,6 @@ export class CompositionHelper {
|
|||||||
// Sync the textarea to the exact position of the composition view so the IME knows where the
|
// Sync the textarea to the exact position of the composition view so the IME knows where the
|
||||||
// text is.
|
// text is.
|
||||||
const compositionViewBounds = this._compositionView.getBoundingClientRect();
|
const compositionViewBounds = this._compositionView.getBoundingClientRect();
|
||||||
this._textarea.style.position = 'absolute';
|
|
||||||
this._textarea.style.left = cursorLeft + 'px';
|
this._textarea.style.left = cursorLeft + 'px';
|
||||||
this._textarea.style.top = cursorTop + 'px';
|
this._textarea.style.top = cursorTop + 'px';
|
||||||
this._textarea.style.width = compositionViewBounds.width + 'px';
|
this._textarea.style.width = compositionViewBounds.width + 'px';
|
||||||
|
|||||||
Reference in New Issue
Block a user