Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Allow Enter key to submit name in anonymous like/comment modal

Anand Baburajan05c649d3d607
diff --git a/web/packages/gallery/components/viewer/AddNameModal.tsx b/web/packages/gallery/components/viewer/AddNameModal.tsx
index 9e68dbf122..034ffd9c74 100644
--- a/web/packages/gallery/components/viewer/AddNameModal.tsx
+++ b/web/packages/gallery/components/viewer/AddNameModal.tsx
@@ -233,6 +233,12 @@ export const AddNameModal: React.FC<AddNameModalProps> = ({
variant="standard"
value={name}
onChange={(e) => setName(e.target.value)}
+ onKeyDown={(e) => {
+ if (e.key === "Enter") {
+ e.preventDefault();
+ handleSubmit();
+ }
+ }}
autoFocus
/>