Skip to content

Commit

Permalink
Fix: region-clicked event not firing and seek issue inside region (#3911
Browse files Browse the repository at this point in the history
  • Loading branch information
Olejqua committed Nov 29, 2024
1 parent e7ceaf9 commit c2ef4b9
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 c2ef4b9

Please sign in to comment.