Skip to content

Commit

Permalink
[JENKINS-71252][JENKINS-70793] Multiple form validation fixes (jenkin…
Browse files Browse the repository at this point in the history
…sci#8422)

* [JENKINS-71252] Show form validation for hidden elements

* [JENKINS-70793] Clear all validation output on update

---------

Co-authored-by: Daniel Beck <[email protected]>

(cherry picked from commit 012fa00)
  • Loading branch information
daniel-beck authored and MarkEWaite committed Oct 29, 2023
1 parent 25949ac commit 7eb9b9e
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions war/src/main/webapp/scripts/hudson-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,17 +639,7 @@ function updateValidationArea(validationArea, content) {
// Only change content if different, causes an unnecessary animation otherwise
if (validationArea.innerHTML !== content) {
validationArea.innerHTML = content;
validationArea.style.height =
validationArea.children[0].offsetHeight + "px";

// Only include the notice in the validation-error-area, move all other elements out
if (validationArea.children.length > 1) {
Array.from(validationArea.children)
.slice(1)
.forEach((element) => {
validationArea.after(element);
});
}
validationArea.style.height = "auto";

Behaviour.applySubtree(validationArea);
// For errors with additional details, apply the subtree to the expandable details pane
Expand Down

0 comments on commit 7eb9b9e

Please sign in to comment.