summaryrefslogtreecommitdiff
path: root/packages/frontend/src/components/MkTextarea.vue
diff options
context:
space:
mode:
authorかっこかり <67428053+kakkokari-gtyih@users.noreply.github.com>2026-01-13 15:02:50 +0900
committerGitHub <noreply@github.com>2026-01-13 15:02:50 +0900
commitf3aa5081ed994af857a97798528e1788d7762d36 (patch)
tree954f29b7743842dc62c76466c200c0dfce885d89 /packages/frontend/src/components/MkTextarea.vue
parentfix(frontend): add "px" suffix to borderWidth of Ui:C:container (#17088) (diff)
downloadmisskey-f3aa5081ed994af857a97798528e1788d7762d36.tar.gz
misskey-f3aa5081ed994af857a97798528e1788d7762d36.tar.bz2
misskey-f3aa5081ed994af857a97798528e1788d7762d36.zip
fix(frontend): MkFormで入力に不備がある場合は完了ボタンを押して続行できないように (#17096)
* fix(frontend): MkFormで入力に不備がある場合は完了ボタンを押して続行できないように * fix lint
Diffstat (limited to 'packages/frontend/src/components/MkTextarea.vue')
-rw-r--r--packages/frontend/src/components/MkTextarea.vue5
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/frontend/src/components/MkTextarea.vue b/packages/frontend/src/components/MkTextarea.vue
index d53d4ec018..fe4f7b7aaf 100644
--- a/packages/frontend/src/components/MkTextarea.vue
+++ b/packages/frontend/src/components/MkTextarea.vue
@@ -67,6 +67,7 @@ const emit = defineEmits<{
(ev: 'keydown', _ev: KeyboardEvent): void;
(ev: 'enter'): void;
(ev: 'update:modelValue', value: string): void;
+ (ev: 'savingStateChange', saved: boolean, invalid: boolean): void;
}>();
const { modelValue, autofocus } = toRefs(props);
@@ -131,6 +132,10 @@ watch(v, () => {
invalid.value = inputEl.value?.validity.badInput ?? true;
});
+watch([changed, invalid], ([newChanged, newInvalid]) => {
+ emit('savingStateChange', newChanged, newInvalid);
+}, { immediate: true });
+
onMounted(() => {
nextTick(() => {
if (autofocus.value) {