mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
TextBuffer: input text scroll margin
This commit is contained in:
parent
69460a7f55
commit
12e894b41c
2 changed files with 7 additions and 6 deletions
|
|
@ -67,10 +67,10 @@ 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)
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue