Fix scrolling to fractions

This commit is contained in:
John Factotum
2023-03-20 15:52:19 +08:00
parent 1511884137
commit ef5ca72ba6
+1 -1
View File
@@ -573,7 +573,7 @@ export class Paginator {
return this.#scrollTo(offset, reason) return this.#scrollTo(offset, reason)
} }
async #scrollToAnchor(select) { async #scrollToAnchor(select) {
const rects = uncollapse(this.#anchor)?.getClientRects() const rects = uncollapse(this.#anchor)?.getClientRects?.()
// if anchor is an element or a range // if anchor is an element or a range
if (rects) { if (rects) {
// when the start of the range is immediately after a hyphen in the // when the start of the range is immediately after a hyphen in the