fix interactable parsing (#2228)

This commit is contained in:
Shuchang Zheng
2025-04-24 16:30:41 +08:00
committed by GitHub
parent 4805a5d85a
commit 5582998490

View File

@@ -603,6 +603,10 @@ function isInteractable(element, hoverStylesMap) {
return false;
}
if (hasWidgetRole(element)) {
return true;
}
// element with pointer-events: none should not be considered as interactable
// https://developer.mozilla.org/en-US/docs/Web/CSS/pointer-events#none
const elementPointerEvent = getElementComputedStyle(element)?.pointerEvents;
@@ -610,10 +614,6 @@ function isInteractable(element, hoverStylesMap) {
return false;
}
if (hasWidgetRole(element)) {
return true;
}
if (isInteractableInput(element)) {
return true;
}