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

View file

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