mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2025-09-02 02:30:07 +00:00
update the rewritten select2 code (#187)
This commit is contained in:
parent
871de94479
commit
935453c3da
1 changed files with 4 additions and 3 deletions
|
@ -505,9 +505,6 @@ function buildTreeFromBody() {
|
|||
const selectContainers = document.querySelectorAll(".select2-container");
|
||||
|
||||
selectContainers.forEach((element) => {
|
||||
// hide the select2 container
|
||||
element.style.display = "none";
|
||||
|
||||
// search select in previous
|
||||
let _pre = element.previousElementSibling;
|
||||
while (_pre) {
|
||||
|
@ -516,6 +513,8 @@ function buildTreeFromBody() {
|
|||
_pre.style.display === "none"
|
||||
) {
|
||||
_pre.style.removeProperty("display");
|
||||
// only hide the select2 container when an alternative select found
|
||||
element.style.display = "none";
|
||||
return;
|
||||
}
|
||||
_pre = _pre.previousElementSibling;
|
||||
|
@ -529,6 +528,8 @@ function buildTreeFromBody() {
|
|||
_next.style.display === "none"
|
||||
) {
|
||||
_next.style.removeProperty("display");
|
||||
// only hide the select2 container when an alternative select found
|
||||
element.style.display = "none";
|
||||
return;
|
||||
}
|
||||
_next = _next.nextElementSibling;
|
||||
|
|
Loading…
Add table
Reference in a new issue