diff --git a/src/plugins/regions.ts b/src/plugins/regions.ts index 1dfa94964..0092aac07 100644 --- a/src/plugins/regions.ts +++ b/src/plugins/regions.ts @@ -527,9 +527,9 @@ class RegionsPlugin extends BasePlugin scrollLeft && start < scrollLeft + clientWidth - if (isVisible) { + if (isVisible && !element.parentElement) { container.appendChild(element) - } else { + } else if (!isVisible && element.parentElement) { element.remove() } }