mirror of
https://github.com/He4eT/elseifplayer.git
synced 2026-05-05 01:17:22 +00:00
TextBuffer: add keyboard scrolling support
This commit is contained in:
parent
d95ee172bb
commit
7240be1120
2 changed files with 11 additions and 9 deletions
|
|
@ -82,6 +82,7 @@ export default function ({ inbox, currentWindow }) {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
|
tabindex='0'
|
||||||
ref={textBufferEl}
|
ref={textBufferEl}
|
||||||
className={classes}>
|
className={classes}>
|
||||||
{messages.map(TextMessage)}
|
{messages.map(TextMessage)}
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@
|
||||||
border: var(--border-width) solid var(--main-color);
|
border: var(--border-width) solid var(--main-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ifplayer .buffer {
|
.ifplayer .output .buffer {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
|
@ -54,32 +54,33 @@
|
||||||
scrollbar-width: thin;
|
scrollbar-width: thin;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ifplayer .buffer:empty {
|
.ifplayer .output .buffer:empty {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ifplayer .buffer::-webkit-scrollbar {
|
.ifplayer .output .buffer::-webkit-scrollbar {
|
||||||
width: 8px;
|
width: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ifplayer .buffer::-webkit-scrollbar-thumb {
|
.ifplayer .output .buffer::-webkit-scrollbar-thumb {
|
||||||
background-color: var(--main-color);
|
background-color: var(--main-color);
|
||||||
border: 4px solid var(--bg-color);
|
border: 4px solid var(--bg-color);
|
||||||
border-left-width: 0px;
|
border-left-width: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ifplayer .gridBuffer {
|
.ifplayer .output .gridBuffer {
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
border-bottom: var(--border-width) solid var(--main-color);
|
border-bottom: var(--border-width) solid var(--main-color);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ifplayer .textBuffer {
|
.ifplayer .output .textBuffer {
|
||||||
flex: 2 1;
|
flex: 2 1;
|
||||||
|
outline: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ifplayer .textBuffer > br:first-child,
|
.ifplayer .output .textBuffer > br:first-child,
|
||||||
.ifplayer .textBuffer > br:last-child,
|
.ifplayer .output .textBuffer > br:last-child,
|
||||||
.ifplayer .textBuffer > br + br + br {
|
.ifplayer .output .textBuffer > br + br + br {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue