fix comment "+" position: anchor on description span (tooltipLink), not <a>, so it sits left; v1.2.1

This commit is contained in:
2026-07-07 09:19:50 -03:00
parent 310c34620f
commit ff6abf1d49
3 changed files with 10 additions and 11 deletions

View File

@@ -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 <span class="tooltip"> (Kanboard's
// tooltipLink), not an <a>, 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);
}
}

View File

@@ -68,7 +68,7 @@ class Plugin extends Base
public function getPluginVersion()
{
return '1.2.0';
return '1.2.1';
}
public function getPluginHomepage()

View File

@@ -1 +1 @@
OrganonTweaks v1.2
OrganonTweaks v1.2.1