Skip to content

Commit

Permalink
fix angular select bug (#831)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykeremy authored Sep 16, 2024
1 parent 8c2a733 commit 8d0b044
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions skyvern/webeye/scraper/domUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,10 @@ function isInteractable(element) {
return true;
}

if (tagName === "div" && hasAngularClickBinding(element)) {
return true;
if (tagName === "div" || tagName === "span") {
if (hasAngularClickBinding(element)) {
return true;
}
}

// support listbox and options underneath it
Expand Down Expand Up @@ -562,12 +564,7 @@ const isAngularDropdown = (element) => {
}

const tagName = element.tagName.toLowerCase();
// TODO: some angular might use <span> to trigger dropdown menu
// if (tagName === "span") {
// ...
// }

if (tagName === "input") {
if (tagName === "input" || tagName === "span") {
const ariaLabel = element.hasAttribute("aria-label")
? element.getAttribute("aria-label").toLowerCase()
: "";
Expand Down

0 comments on commit 8d0b044

Please sign in to comment.