fix(dashboard): Allow using the Enter key in product create Textarea (#11488)

Resolves SUP-911
This commit is contained in:
Kasper Fabricius Kristensen
2025-02-18 10:21:26 +00:00
committed by GitHub
parent 99a6ecc12d
commit 06cc658246
2 changed files with 12 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@medusajs/dashboard": patch
---
fix(dashboard): Allow using the Enter key in product create Textarea
@@ -220,6 +220,13 @@ export const ProductCreateForm = ({
onKeyDown={(e) => {
// We want to continue to the next tab on enter instead of saving as draft immediately
if (e.key === "Enter") {
if (
e.target instanceof HTMLTextAreaElement &&
!(e.metaKey || e.ctrlKey)
) {
return
}
e.preventDefault()
if (e.metaKey || e.ctrlKey) {