diff --git a/src/main/resources/jenkins/scm/api/form/traits/traits.js b/src/main/resources/jenkins/scm/api/form/traits/traits.js index 06c72740..21ca3be6 100644 --- a/src/main/resources/jenkins/scm/api/form/traits/traits.js +++ b/src/main/resources/jenkins/scm/api/form/traits/traits.js @@ -32,7 +32,7 @@ }) }); Behaviour.specify(".repeatable-delete", 'traits', 500, function (e) { - var c = findAncestorClass(e, "trait-container"); + var c = e.closest(".trait-container"); if (c) { var btn = YAHOO.widget.Button.getButton(e.id); if (btn) {