a tool for shared writing and social publishing

oops console logs

-6
-6
src/utils/scrollIntoViewIfNeeded.ts
··· 4 4 behavior?: ScrollBehavior, 5 5 rootBottomMargin?: number, 6 6 ) { 7 - console.log("this should scroll up now!"); 8 - 9 7 if (!el) { 10 8 return; 11 9 } ··· 31 29 let scrollContainer = getScrollParent(el); 32 30 let scrollContainerHeight = scrollContainer.clientHeight; 33 31 let distanceFromBottom = scrollContainerHeight - rect.bottom; 34 - 35 - console.log("containerHeight: " + scrollContainerHeight); 36 - console.log("el bottom: " + rect.bottom); 37 - 38 32 scrollContainer.scrollBy({ 39 33 top: Math.abs(rootBottomMargin + distanceFromBottom), 40 34 behavior: behavior ? behavior : "auto",