Skip to content

Commit 358519d

Browse files
authored
Fix context menu is obscured when edit message. (#7951)
1 parent 68c5be8 commit 358519d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

webview-ui/src/components/chat/ChatTextArea.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -908,12 +908,12 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
908908
return (
909909
<div
910910
className={cn(
911-
"relative flex flex-col gap-1 bg-editor-background outline-none border border-none box-border",
912-
isEditMode ? "p-2 w-full" : "px-1.5 pb-1 w-[calc(100%-16px)] ml-auto mr-auto",
911+
"flex flex-col gap-1 bg-editor-background outline-none border border-none box-border",
912+
isEditMode ? "p-2 w-full" : "relative px-1.5 pb-1 w-[calc(100%-16px)] ml-auto mr-auto",
913913
)}>
914-
<div className="relative">
914+
<div className={cn(!isEditMode && "relative")}>
915915
<div
916-
className={cn("chat-text-area", "relative", "flex", "flex-col", "outline-none")}
916+
className={cn("chat-text-area", !isEditMode && "relative", "flex", "flex-col", "outline-none")}
917917
onDrop={handleDrop}
918918
onDragOver={(e) => {
919919
// Only allowed to drop images/files on shift key pressed.
@@ -945,10 +945,10 @@ export const ChatTextArea = forwardRef<HTMLTextAreaElement, ChatTextAreaProps>(
945945
className={cn(
946946
"absolute",
947947
"bottom-full",
948-
"left-0",
948+
isEditMode ? "left-6" : "left-0",
949949
"right-0",
950950
"z-[1000]",
951-
"mb-2",
951+
isEditMode ? "-mb-3" : "mb-2",
952952
"filter",
953953
"drop-shadow-md",
954954
)}>

0 commit comments

Comments
 (0)