fix date picker issue (#1523)

This commit is contained in:
LawyZheng
2025-01-09 16:14:31 +08:00
committed by GitHub
parent d4ffcdbfda
commit dc53a49749
9 changed files with 117 additions and 47 deletions

View File

@@ -753,6 +753,17 @@ function isScrollableOverflow(element) {
);
}
function isDatePickerSelector(element) {
const tagName = element.tagName.toLowerCase();
if (
tagName === "button" &&
element.getAttribute("data-testid")?.includes("date")
) {
return true;
}
return false;
}
const isComboboxDropdown = (element) => {
if (element.tagName.toLowerCase() !== "input") {
return false;
@@ -1197,6 +1208,7 @@ function buildElementObject(frame, element, interactable, purgeable = false) {
elementTagNameLower === "svg" || element.closest("svg") !== null,
isSelectable:
elementTagNameLower === "select" ||
isDatePickerSelector(element) ||
isDivComboboxDropdown(element) ||
isDropdownButton(element) ||
isAngularDropdown(element) ||