History

fix(web): keep thread rename open during IME composition (#6281)

Michael Charles Aubrey committed 3 months ago

Commit 4a2f8b01 parent 8f9ab082 files · +2 −0Browse files

Unified · Split

2 files
  1. apps/web/src/components/Sidebar.tsx +1 −0
  2. apps/web/src/components/chat/ChatHeader.tsx +1 −0
apps/web/src/components/Sidebar.tsx+1−0
@@ -935,6 +935,7 @@ const SidebarThreadRow = memo(function SidebarThreadRow(props: { · 934 unmodified lines
935 const handleRenameKeyDown = useCallback(935 const handleRenameKeyDown = useCallback(
936 (event: ReactKeyboardEvent<HTMLInputElement>) => {936 (event: ReactKeyboardEvent<HTMLInputElement>) => {
937 event.stopPropagation();937 event.stopPropagation();
938 if (event.nativeEvent.isComposing || event.keyCode === 229) return;
938 if (event.key === "Enter") {939 if (event.key === "Enter") {
939 event.preventDefault();940 event.preventDefault();
940 renameCommittedRef.current = true;941 renameCommittedRef.current = true;
apps/web/src/components/chat/ChatHeader.tsx+1−0
@@ -203,6 +203,7 @@ export const ChatHeader = memo(function ChatHeader({ · 202 unmodified lines
203 );203 );
204 const handleRenameKeyDown = useCallback(204 const handleRenameKeyDown = useCallback(
205 (event: ReactKeyboardEvent<HTMLInputElement>) => {205 (event: ReactKeyboardEvent<HTMLInputElement>) => {
206 if (event.nativeEvent.isComposing || event.keyCode === 229) return;
206 if (event.key === "Enter") {207 if (event.key === "Enter") {
207 renameCommittedRef.current = true;208 renameCommittedRef.current = true;
208 commitRename(event.currentTarget.value);209 commitRename(event.currentTarget.value);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t