force checkbox input to be visible (#1203)

This commit is contained in:
LawyZheng
2024-11-15 23:04:02 +08:00
committed by GitHub
parent ff2b297c98
commit b678ec3a80

View File

@@ -246,7 +246,8 @@ function isElementVisible(element) {
// because they are not visible by default. We check their parent instead for visibility.
if (
element.tagName.toLowerCase() === "option" ||
(element.tagName.toLowerCase() === "input" && element.type === "radio")
(element.tagName.toLowerCase() === "input" &&
(element.type === "radio" || element.type === "checkbox"))
)
return element.parentElement && isElementVisible(element.parentElement);