From 7586ef7ba86ae9516e4a9460c0845750dda22e77 Mon Sep 17 00:00:00 2001
From: 1Step621 <86859447+1STEP621@users.noreply.github.com>
Date: Tue, 9 Apr 2024 14:20:00 +0900
Subject: fix(frontend):
 MkDialogのinputで字数制限に違反していてもEnterキーが押せてしまうのを修正
 (#13677)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* MkDialogのinputで字数制限に違反していてもEnterキーが押せてしまうのを修正

* update CHANGELOG.md
---
 packages/frontend/src/components/MkDialog.vue | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'packages/frontend/src/components/MkDialog.vue')

diff --git a/packages/frontend/src/components/MkDialog.vue b/packages/frontend/src/components/MkDialog.vue
index 4577d37c08..c52404a319 100644
--- a/packages/frontend/src/components/MkDialog.vue
+++ b/packages/frontend/src/components/MkDialog.vue
@@ -161,7 +161,7 @@ function onKeydown(evt: KeyboardEvent) {
 }
 
 function onInputKeydown(evt: KeyboardEvent) {
-	if (evt.key === 'Enter') {
+	if (evt.key === 'Enter' && okButtonDisabledReason.value === null) {
 		evt.preventDefault();
 		evt.stopPropagation();
 		ok();
-- 
cgit v1.2.3-freya

