MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / handleEditorScroll

Function handleEditorScroll

src/lib/editorManager.js:2301–2319  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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, {

Callers

nothing calls this directly

Calls 3

onScrollStartMethod · 0.80
onScrollEndMethod · 0.80

Tested by

no test coverage detected