diff --git a/Asset/js/relocate.js b/Asset/js/relocate.js index 543ed6d..8d059ce 100644 --- a/Asset/js/relocate.js +++ b/Asset/js/relocate.js @@ -36,16 +36,21 @@ } function init() { - if (!document.getElementById("board")) { + var container = document.getElementById("board-container"); + + if (!container) { return; } relocate(); - var container = document.getElementById("board-container"); - - if (container && window.MutationObserver) { - new MutationObserver(relocate).observe(container, { childList: true, subtree: true }); + // BoardDragAndDrop.refresh() does $("#board-container").replaceWith(data) on every + // drag-and-drop and poll refresh, so an observer bound to #board-container would be + // left watching a detached node and never fire again (the entry vanishes until F5). + // Observe the stable parent instead: it survives the swap, and its childList mutation + // fires exactly when the container is replaced, so relocate() re-runs on the new DOM. + if (window.MutationObserver && container.parentNode) { + new MutationObserver(relocate).observe(container.parentNode, { childList: true, subtree: true }); } } diff --git a/Plugin.php b/Plugin.php index 1a29205..5e453bb 100644 --- a/Plugin.php +++ b/Plugin.php @@ -35,7 +35,7 @@ class Plugin extends Base public function getPluginVersion() { - return '1.0.1'; + return '1.0.2'; } public function getPluginHomepage() diff --git a/VERSION b/VERSION index 9b92faf..ec62e16 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -BulkMoveTasks v1.0.1 +BulkMoveTasks v1.0.2