Skip to content

Commit

Permalink
Fix(Regions): region-clicked event not firing and seek issue inside r…
Browse files Browse the repository at this point in the history
…egion (#3911, #3804) (#3945)
  • Loading branch information
Olejqua authored Dec 2, 2024
1 parent 6277557 commit 24466fa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/plugins/regions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,9 +527,9 @@ class RegionsPlugin extends BasePlugin<RegionsPluginEvents, RegionsPluginOptions
// Check if the region is between the scrollLeft and scrollLeft + clientWidth
const isVisible = start + width > scrollLeft && start < scrollLeft + clientWidth

if (isVisible) {
if (isVisible && !element.parentElement) {
container.appendChild(element)
} else {
} else if (!isVisible && element.parentElement) {
element.remove()
}
}
Expand Down

0 comments on commit 24466fa

Please sign in to comment.