From ff6abf1d49da9d1ed5247612ecc4b0bc98b421a3 Mon Sep 17 00:00:00 2001 From: Ruben Carlo Benante Date: Tue, 7 Jul 2026 09:19:50 -0300 Subject: [PATCH] fix comment "+" position: anchor on description span (tooltipLink), not , so it sits left; v1.2.1 --- Asset/js/relocate.js | 17 ++++++++--------- Plugin.php | 2 +- VERSION | 2 +- 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Asset/js/relocate.js b/Asset/js/relocate.js index 7393b6a..14ebccd 100644 --- a/Asset/js/relocate.js +++ b/Asset/js/relocate.js @@ -53,19 +53,18 @@ // Native comment icon sits just before the description icon; if there is no // description, before the age / closed block. That is the slot we move into. - var anchor = null; - var descIcon = row.querySelector("i.fa-file-text-o"); + // NB: the description icon is wrapped in (Kanboard's + // tooltipLink), not an , so we walk up to whatever is the row's direct child. + var anchor = row.querySelector("i.fa-file-text-o") || + row.querySelector(".task-icon-age") || + row.querySelector(".task-board-closed"); - if (descIcon) { - anchor = descIcon.closest("a"); - } - - if (!anchor) { - anchor = row.querySelector(".task-icon-age") || row.querySelector(".task-board-closed"); + while (anchor && anchor.parentNode !== row) { + anchor = anchor.parentNode; } // Move only if needed (keeps the MutationObserver from looping). - if (anchor && anchor.parentNode === row && item.nextElementSibling !== anchor) { + if (anchor && anchor !== item && item.nextElementSibling !== anchor) { row.insertBefore(item, anchor); } } diff --git a/Plugin.php b/Plugin.php index d4a33c1..3df0e60 100644 --- a/Plugin.php +++ b/Plugin.php @@ -68,7 +68,7 @@ class Plugin extends Base public function getPluginVersion() { - return '1.2.0'; + return '1.2.1'; } public function getPluginHomepage() diff --git a/VERSION b/VERSION index c89b56d..b853984 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -OrganonTweaks v1.2 +OrganonTweaks v1.2.1