add error handle for click event check (#2596)

This commit is contained in:
Shuchang Zheng
2025-06-04 23:17:28 -07:00
committed by GitHub
parent a46f7248a7
commit 4fd8f5fdad

View File

@@ -818,12 +818,16 @@ function isInteractable(element, hoverStylesMap) {
return true; return true;
} }
try {
if (window.jQuery && window.jQuery._data) { if (window.jQuery && window.jQuery._data) {
const events = window.jQuery._data(element, "events"); const events = window.jQuery._data(element, "events");
if (events && "click" in events) { if (events && "click" in events) {
return true; return true;
} }
} }
} catch (e) {
_jsConsoleError("Error getting jQuery click events:", e);
}
return false; return false;
} }