()
| 2299 | } |
| 2300 | |
| 2301 | function handleEditorScroll() { |
| 2302 | if (!scroller) return; |
| 2303 | if (restoreScrollbarScrollLock()) return; |
| 2304 | if (!isScrolling) { |
| 2305 | isScrolling = true; |
| 2306 | if (hasHoverTooltips(editor.state)) { |
| 2307 | editor.dispatch({ effects: closeHoverTooltips }); |
| 2308 | } |
| 2309 | touchSelectionController?.onScrollStart(); |
| 2310 | } |
| 2311 | if (!scrollSyncRaf) { |
| 2312 | scrollSyncRaf = requestAnimationFrame(syncScrollUi); |
| 2313 | } |
| 2314 | clearTimeout(scrollTimeout); |
| 2315 | scrollTimeout = setTimeout(() => { |
| 2316 | isScrolling = false; |
| 2317 | touchSelectionController?.onScrollEnd(); |
| 2318 | }, 100); |
| 2319 | } |
| 2320 | |
| 2321 | scroller?.addEventListener("scroll", handleEditorScroll, { passive: true }); |
| 2322 | scroller?.addEventListener("pointerdown", clearScrollbarScrollLock, { |
nothing calls this directly
no test coverage detected