mirror of
https://github.com/john-okeefe/foliate-js.git
synced 2026-09-09 11:29:14 -04:00
TTS: split document into ranges of block elements
This commit is contained in:
+1
-1
@@ -793,7 +793,7 @@ export class Paginator extends HTMLElement {
|
||||
}
|
||||
#selectAnchor() {
|
||||
const { defaultView } = this.#view.document
|
||||
if (this.#anchor instanceof defaultView.Range) {
|
||||
if (this.#anchor.startContainer) {
|
||||
const sel = defaultView.getSelection()
|
||||
sel.removeAllRanges()
|
||||
sel.addRange(this.#anchor)
|
||||
|
||||
Reference in New Issue
Block a user