Skip to content

Commit 0daf772

Browse files
use onDidLayoutContainer
1 parent 9d59d1c commit 0daf772

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/vs/platform/quickinput/browser/quickInputController.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -938,15 +938,18 @@ class QuickInputDragAndDropController extends Disposable {
938938
}
939939

940940
private _registerLayoutListener() {
941-
this._layoutService.onDidLayoutActiveContainer((e) => {
941+
this._layoutService.onDidLayoutContainer((e) => {
942+
if (e.container !== this._container) {
943+
return;
944+
}
942945
const state = this.dndViewState.get();
943946
const dragAreaRect = this._quickInputContainer.getBoundingClientRect();
944947
if (state?.top && state?.left) {
945948
const a = Math.round(state.left * 1e2) / 1e2;
946-
const b = e.width;
949+
const b = e.dimension.width;
947950
const c = dragAreaRect.width;
948951
const d = a * b - c / 2;
949-
this._layout(state.top * e.height, d);
952+
this._layout(state.top * e.dimension.height, d);
950953
}
951954
});
952955
}

0 commit comments

Comments
 (0)