(y: number)
| 117 | ref, |
| 118 | (): ScrollBoxHandle => ({ |
| 119 | scrollTo(y: number) { |
| 120 | const el = domRef.current; |
| 121 | if (!el) return; |
| 122 | // Explicit false overrides the DOM attribute so manual scroll |
| 123 | // breaks stickiness. Render code checks ?? precedence. |
| 124 | el.stickyScroll = false; |
| 125 | el.pendingScrollDelta = undefined; |
| 126 | el.scrollAnchor = undefined; |
| 127 | el.scrollTop = Math.max(0, Math.floor(y)); |
| 128 | scrollMutated(el); |
| 129 | }, |
| 130 | scrollToElement(el: DOMElement, offset = 0) { |
| 131 | const box = domRef.current; |
| 132 | if (!box) return; |
nothing calls this directly
no test coverage detected