bookreader icon indicating copy to clipboard operation
bookreader copied to clipboard

Fix duplicate SelectionObserver instantiation

Open snehasipani opened this issue 1 week ago • 0 comments

What

Consolidates selection-related side effects under a single SelectionObserver instance.

Why

TextSelectionManager was creating multiple SelectionObserver instances for the same layer. This change avoids duplicate observers and ensures consistent attach/detach behavior.

Scope

No user-visible behavior change intended.

Notes

Adds a type guard to ensure classList is accessed only on Element nodes when walking the DOM.

snehasipani avatar Dec 14 '25 11:12 snehasipani