Skip to content

Commit 90a340c

Browse files
committed
fix(align-branch): sidebar node triggers reveal-node-vertically
1 parent 5f1be40 commit 90a340c

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/view/actions/inline-editor/expandable-textarea-action.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ export const AdjustHeight = (view: LineageView, el: HTMLElement) => {
99
let previousScrollHeight = 0;
1010
let x: HTMLElement;
1111
const limitCardHeight = get(limitPreviewHeightStore(view));
12+
const viewState = view.viewStore.getValue();
13+
const isInSidebar = viewState.document.editing.isInSidebar;
14+
1215
return (e?: KeyboardEvent) => {
1316
if (!x) {
1417
x = el.querySelector('.cm-scroller') as HTMLElement;
@@ -24,7 +27,7 @@ export const AdjustHeight = (view: LineageView, el: HTMLElement) => {
2427
previousScrollHeight = x.scrollHeight;
2528
el.style.height = previousScrollHeight + 'px';
2629
x.style.height = '';
27-
if (limitCardHeight && scrollHeightChange) {
30+
if (!isInSidebar && limitCardHeight && scrollHeightChange) {
2831
view.alignBranch.align({
2932
type: 'view/align-branch/reveal-node',
3033
});

0 commit comments

Comments
 (0)