TextBuffer: input text scroll margin

This commit is contained in:
He4eT 2023-06-04 01:55:31 +03:00 committed by Alexey
commit 12e894b41c
2 changed files with 7 additions and 6 deletions

View file

@ -67,12 +67,12 @@ export default function TextBuffer ({ inbox, currentWindow }) {
const lastInput = const lastInput =
inputs[inputs.length - 1] inputs[inputs.length - 1]
textBufferEl.current.scrollTo({ lastInput
top: lastInput ? lastInput.scrollIntoView()
? lastInput.offsetTop : textBufferEl.current.scrollTo({
: textBufferEl.current.scrollHeight, top: textBufferEl.current.scrollHeight,
behavior: 'smooth', behavior: 'smooth',
}) })
}, 0) }, 0)
}, [currentWindow, inbox]) }, [currentWindow, inbox])

View file

@ -103,6 +103,7 @@
} }
.ifplayer .output .textBuffer .message.input { .ifplayer .output .textBuffer .message.input {
scroll-margin-top: var(--inner-padding);
color: var(--input-color); color: var(--input-color);
} }