Skip to content

Commit

Permalink
Replace deprecated functions with standard JS (#194)
Browse files Browse the repository at this point in the history
  • Loading branch information
zbynek authored Oct 28, 2023
1 parent 6aab0fa commit 3580a75
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,16 @@ Behaviour.specify(".specific-user-authorization", "checkPasswordRequired", 0, fu

var useridField = findFormItem(e, "userid", findChild(e));
var passwordField = findFormItem(e, "password", findChild(e));
var passwordFieldBlock = findAncestor(passwordField, "TR");
var passwordFieldBlock = passwordField.closest("TR");
/*
[JENKINS-64341] - In Jenkins version greater than 2.263.4
the table tags for fields (in forms) were replaced by div tags.
Since the changes were applied the 'findAncestor(passwordField, "TR")'
Since the changes were applied the 'passwordField.closest("TR")'
method returns null. It is necessary to use the method
'findAncestorClass(passwordField, "tr")' instead of.
'passwordField.closest(".tr")' instead.
*/
if (passwordFieldBlock == null) {
passwordFieldBlock = findAncestorClass(passwordField, "tr");
passwordFieldBlock = passwordField.closest(".tr");
}

var passwordCheckBlock = findFollowingTR(passwordField, "validation-error-area");
Expand Down

0 comments on commit 3580a75

Please sign in to comment.