From 0daf772bd4b47d541a06153542ba255d328c673c Mon Sep 17 00:00:00 2001 From: Tyler Leonhardt Date: Fri, 17 Jan 2025 15:55:48 -0800 Subject: [PATCH] use `onDidLayoutContainer` --- .../platform/quickinput/browser/quickInputController.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/vs/platform/quickinput/browser/quickInputController.ts b/src/vs/platform/quickinput/browser/quickInputController.ts index de2f00bee9211..68c9a9cd8089a 100644 --- a/src/vs/platform/quickinput/browser/quickInputController.ts +++ b/src/vs/platform/quickinput/browser/quickInputController.ts @@ -938,15 +938,18 @@ class QuickInputDragAndDropController extends Disposable { } private _registerLayoutListener() { - this._layoutService.onDidLayoutActiveContainer((e) => { + this._layoutService.onDidLayoutContainer((e) => { + if (e.container !== this._container) { + return; + } const state = this.dndViewState.get(); const dragAreaRect = this._quickInputContainer.getBoundingClientRect(); if (state?.top && state?.left) { const a = Math.round(state.left * 1e2) / 1e2; - const b = e.width; + const b = e.dimension.width; const c = dragAreaRect.width; const d = a * b - c / 2; - this._layout(state.top * e.height, d); + this._layout(state.top * e.dimension.height, d); } }); }