diff --git a/js/Article.js b/js/Article.js index b1d14c390..90be90f7b 100644 --- a/js/Article.js +++ b/js/Article.js @@ -63,7 +63,7 @@ const Article = { } }, setScore: function (id, pic) { - const row = pic.up("div[id*=RROW]"); + const row = pic.closest("div[id*=RROW]"); if (row) { const score_old = row.getAttribute("data-score"); diff --git a/js/Headlines.js b/js/Headlines.js index 143a42d0b..34dc9385e 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -1093,7 +1093,7 @@ const Headlines = { return rv; }, onRowChecked: function (elem) { - const row = elem.domNode.up("div[id*=RROW]"); + const row = elem.domNode.closest("div[id*=RROW]"); // do not allow unchecking active article checkbox if (row.hasClassName("active")) { diff --git a/js/common.js b/js/common.js index a5e1e503a..f96ac8da4 100755 --- a/js/common.js +++ b/js/common.js @@ -164,7 +164,7 @@ const Lists = { // account for dojo checkboxes elem = elem.domNode || elem; - const row = elem.up("li"); + const row = elem.closest("li"); if (row) checked ? row.addClassName("Selected") : row.removeClassName("Selected"); @@ -194,7 +194,7 @@ const Tables = { const checked = elem.domNode ? elem.attr("checked") : elem.checked; elem = elem.domNode || elem; - const row = elem.up("tr"); + const row = elem.closest("tr"); if (row) checked ? row.addClassName("Selected") : row.removeClassName("Selected");