check customized element pointer style (#3772)

This commit is contained in:
LawyZheng
2025-10-20 14:20:11 +08:00
committed by GitHub
parent de5a55bd66
commit c2d7e6f2d0

View File

@@ -949,6 +949,7 @@ function isInteractable(element, hoverStylesMap) {
return true;
}
// FIXME: maybe we need to enable the pointer check for all elements?
if (
tagName === "div" ||
tagName === "img" ||
@@ -963,7 +964,12 @@ function isInteractable(element, hoverStylesMap) {
tagName === "h1" ||
tagName === "h2" ||
tagName === "h3" ||
tagName === "h4"
tagName === "h4" ||
// sometime it's a customized element like <my-login-button>, we should check pointer style
tagName.includes("button") ||
tagName.includes("select") ||
tagName.includes("option") ||
tagName.includes("textarea")
) {
if (isHoverPointerElement(element, hoverStylesMap)) {
return true;