fix li interactable (#2511)
Some checks are pending
Run tests and pre-commit / test (push) Waiting to run
Run tests and pre-commit / fe-lint-build (push) Waiting to run
Publish Fern Docs / run (push) Waiting to run
Sync to skyvern-cloud / sync (push) Waiting to run

This commit is contained in:
Shuchang Zheng 2025-05-29 08:03:39 -07:00 committed by GitHub
parent 08bf2bc428
commit 49ef1aaa07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -704,16 +704,18 @@ function isInteractable(element, hoverStylesMap) {
return true;
}
const className = element.className.toString();
if (tagName === "div" || tagName === "span") {
if (hasAngularClickBinding(element)) {
return true;
}
if (element.className.toString().includes("blinking-cursor")) {
if (className.includes("blinking-cursor")) {
return true;
}
// https://www.oxygenxml.com/dita/1.3/specs/langRef/technicalContent/svg-container.html
// svg-container is usually used for clickable elements that wrap SVGs
if (element.className.toString().includes("svg-container")) {
if (className.includes("svg-container")) {
return true;
}
}
@ -737,7 +739,7 @@ function isInteractable(element, hoverStylesMap) {
if (
tagName === "li" &&
element.className.toString().includes("ui-menu-item")
(className.includes("ui-menu-item") || className.includes("dropdown-item"))
) {
return true;
}
@ -747,7 +749,7 @@ function isInteractable(element, hoverStylesMap) {
// demo: https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform
if (
tagName === "div" &&
element.className.toString().includes("pac-item") &&
className.includes("pac-item") &&
element.closest('div[class*="pac-container"]')
) {
return true;
@ -803,7 +805,7 @@ function isInteractable(element, hoverStylesMap) {
}
// FIXME: hardcode to fix the bug about hover style now
if (element.className.toString().includes("hover:cursor-pointer")) {
if (className.includes("hover:cursor-pointer")) {
return true;
}
}