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,11 +818,15 @@ function isInteractable(element, hoverStylesMap) {
return true;
}
if (window.jQuery && window.jQuery._data) {
const events = window.jQuery._data(element, "events");
if (events && "click" in events) {
return true;
try {
if (window.jQuery && window.jQuery._data) {
const events = window.jQuery._data(element, "events");
if (events && "click" in events) {
return true;
}
}
} catch (e) {
_jsConsoleError("Error getting jQuery click events:", e);
}
return false;