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