From 46c2a78af06f139d9f0e8bb42c4099eb27e9b8a6 Mon Sep 17 00:00:00 2001 From: Jan Faracik <43062514+janfaracik@users.noreply.github.com> Date: Mon, 15 Nov 2021 19:50:29 +0000 Subject: [PATCH] Update hudson-behavior.js --- war/src/main/webapp/scripts/hudson-behavior.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/war/src/main/webapp/scripts/hudson-behavior.js b/war/src/main/webapp/scripts/hudson-behavior.js index 93ddc18fc8ff..9bda8abc9ce4 100644 --- a/war/src/main/webapp/scripts/hudson-behavior.js +++ b/war/src/main/webapp/scripts/hudson-behavior.js @@ -1208,8 +1208,10 @@ function rowvgStartEachRow(recursive,f) { }); Behaviour.specify("TR.optional-block-start,DIV.tr.optional-block-start", "tr-optional-block-start-div-tr-optional-block-start", ++p, function(e) { // see optionalBlock.jelly - // set start.ref to checkbox in preparation of row-set-end processing - var checkbox = e.down().down().down(); + // Get the `input` from the checkbox container + var checkbox = e.querySelector("input[type='checkbox']") + + // Set start.ref to checkbox in preparation of row-set-end processing e.setAttribute("ref", checkbox.id = "cb"+(iota++)); });