fix(picker-column-internal): blurring picker does not throw error (#26560)

Resolves #26559
This commit is contained in:
Sean Perkins
2023-01-04 16:13:56 -05:00
committed by GitHub
parent 32c2622ab0
commit 3e671b9c8f

View File

@ -254,12 +254,13 @@ export class PickerColumnInternal implements ComponentInterface {
const centerX = bbox.x + bbox.width / 2;
const centerY = bbox.y + bbox.height / 2;
const activeElement = el.shadowRoot!.elementFromPoint(centerX, centerY) as HTMLButtonElement;
const activeElement = el.shadowRoot!.elementFromPoint(centerX, centerY) as HTMLButtonElement | null;
if (activeEl !== null) {
activeEl.classList.remove(PICKER_COL_ACTIVE);
}
if (activeElement.disabled) {
if (activeElement === null || activeElement.disabled) {
return;
}