mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 09:21:24 +08:00
fix(core): ai input cannot scroll (#12184)
### TL;DR fix: ai chat input cannot scroll > CLOSE AI-115 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Style** - Improved the appearance of the vertical scrollbar in the chat input area, making it visible and styled with custom colors and rounded corners. - **Bug Fixes** - The vertical scrollbar in the chat input now appears when needed, instead of being hidden. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import { stopPropagation } from '@affine/core/utils';
|
import { stopPropagation } from '@affine/core/utils';
|
||||||
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
|
import { SignalWatcher, WithDisposable } from '@blocksuite/affine/global/lit';
|
||||||
import { unsafeCSSVarV2 } from '@blocksuite/affine/shared/theme';
|
import { unsafeCSSVar, unsafeCSSVarV2 } from '@blocksuite/affine/shared/theme';
|
||||||
import { openFileOrFiles } from '@blocksuite/affine/shared/utils';
|
import { openFileOrFiles } from '@blocksuite/affine/shared/utils';
|
||||||
import type { EditorHost } from '@blocksuite/affine/std';
|
import type { EditorHost } from '@blocksuite/affine/std';
|
||||||
import {
|
import {
|
||||||
@@ -182,10 +182,30 @@ export class AIChatInput extends SignalWatcher(WithDisposable(LitElement)) {
|
|||||||
color: var(--affine-text-primary-color);
|
color: var(--affine-text-primary-color);
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
resize: none;
|
resize: none;
|
||||||
overflow-y: hidden;
|
overflow-y: scroll;
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
textarea::-webkit-scrollbar {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
width: 4px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea::-webkit-scrollbar:horizontal {
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: 2px;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea:hover::-webkit-scrollbar-thumb {
|
||||||
|
border-radius: 16px;
|
||||||
|
background-color: ${unsafeCSSVar('black30')};
|
||||||
|
}
|
||||||
|
|
||||||
textarea::placeholder {
|
textarea::placeholder {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|||||||
Reference in New Issue
Block a user