Skip to content

Commit 2b91bb8

Browse files
committed
💄
1 parent d85c80d commit 2b91bb8

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

src/browser/Clipboard.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ export function moveTextAreaUnderMouseCursor(ev: MouseEvent, textarea: HTMLTextA
7070
const top = ev.clientY - pos.top - 10;
7171

7272
// Bring textarea at the cursor position
73-
textarea.style.position = 'absolute';
7473
textarea.style.width = '20px';
7574
textarea.style.height = '20px';
7675
textarea.style.left = `${left}px`;

src/browser/Terminal.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ export class Terminal extends CoreTerminal implements ITerminal {
282282
}
283283

284284
private _syncTextArea(): void {
285-
if (!this.buffer.isCursorInViewport || this._compositionHelper!.isComposing) {
285+
if (!this.textarea || !this.buffer.isCursorInViewport || this._compositionHelper!.isComposing) {
286286
return;
287287
}
288288

@@ -292,13 +292,12 @@ export class Terminal extends CoreTerminal implements ITerminal {
292292

293293
// Sync the textarea to the exact position of the composition view so the IME knows where the
294294
// text is.
295-
this.textarea!.style.position = 'absolute';
296-
this.textarea!.style.left = cursorLeft + 'px';
297-
this.textarea!.style.top = cursorTop + 'px';
298-
this.textarea!.style.width = this._charSizeService!.width + 'px';
299-
this.textarea!.style.height = cellHeight + 'px';
300-
this.textarea!.style.lineHeight = cellHeight + 'px';
301-
this.textarea!.style.zIndex = '-5';
295+
this.textarea.style.left = cursorLeft + 'px';
296+
this.textarea.style.top = cursorTop + 'px';
297+
this.textarea.style.width = this._charSizeService!.width + 'px';
298+
this.textarea.style.height = cellHeight + 'px';
299+
this.textarea.style.lineHeight = cellHeight + 'px';
300+
this.textarea.style.zIndex = '-5';
302301
}
303302

304303
/**

src/browser/input/CompositionHelper.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,6 @@ export class CompositionHelper {
207207
// Sync the textarea to the exact position of the composition view so the IME knows where the
208208
// text is.
209209
const compositionViewBounds = this._compositionView.getBoundingClientRect();
210-
this._textarea.style.position = 'absolute';
211210
this._textarea.style.left = cursorLeft + 'px';
212211
this._textarea.style.top = cursorTop + 'px';
213212
this._textarea.style.width = compositionViewBounds.width + 'px';

0 commit comments

Comments
 (0)