debt - fix regression with layer checker and DOM (#306119)

This commit is contained in:
Benjamin Pasero
2026-03-29 20:13:02 +02:00
committed by GitHub
parent 18675700ad
commit 1bff585f1a
4 changed files with 9 additions and 7 deletions

View File

@@ -22,6 +22,7 @@
],
"exclude": [
"../../src/**/test/**",
"../../src/**/fixtures/**"
"../../src/**/fixtures/**",
"../../src/typings/editContext.d.ts"
]
}

View File

@@ -23,6 +23,7 @@
],
"exclude": [
"../../src/**/test/**",
"../../src/**/fixtures/**"
"../../src/**/fixtures/**",
"../../src/typings/editContext.d.ts"
]
}

View File

@@ -38,7 +38,7 @@ import { defaultCheckboxStyles } from '../../theme/browser/defaultStyles.js';
import { QuickInputTreeController } from './tree/quickInputTreeController.js';
import { QuickTree } from './tree/quickTree.js';
import { AnchorAlignment, AnchorPosition, layout2d } from '../../../base/common/layout.js';
import { getAnchorRect } from '../../../base/browser/ui/contextview/contextview.js';
import { getAnchorRect, IAnchor } from '../../../base/browser/ui/contextview/contextview.js';
const $ = dom.$;
@@ -875,7 +875,7 @@ export class QuickInputController extends Disposable {
// Position
if (this.controller?.anchor) {
const container = this.layoutService.getContainer(dom.getActiveWindow()).getBoundingClientRect();
const anchor = getAnchorRect(this.controller.anchor);
const anchor = getAnchorRect(this.controller.anchor as HTMLElement | IAnchor);
width = 380;
listHeight = this.dimension ? Math.min(this.dimension.height * 0.2, 200) : 200;

View File

@@ -205,7 +205,7 @@ export interface IPickOptions<T extends IQuickPickItem> {
/**
* an optional anchor for the picker
*/
anchor?: HTMLElement | { x: number; y: number };
anchor?: unknown /* HTMLElement */ | { x: number; y: number };
onKeyMods?: (keyMods: IKeyMods) => void;
onDidFocus?: (entry: T) => void;
@@ -366,7 +366,7 @@ export interface IQuickInput extends IDisposable {
/**
* An optional anchor for the quick input.
*/
anchor?: HTMLElement | { x: number; y: number };
anchor?: unknown /* HTMLElement */ | { x: number; y: number };
/**
* Shows the quick input.
@@ -401,7 +401,7 @@ export interface IQuickWidget extends IQuickInput {
/**
* A HTML element that will be rendered inside the quick input.
*/
widget: HTMLElement | undefined;
widget: unknown /* HTMLElement */ | undefined;
}
export interface IQuickPickWillAcceptEvent {