diff --git a/components/composer/composer.vue b/components/composer/composer.vue
index 7a4a69a..6e177df 100644
--- a/components/composer/composer.vue
+++ b/components/composer/composer.vue
@@ -6,7 +6,7 @@
-
@@ -122,6 +122,13 @@ const { Control_Enter, Command_Enter } = useMagicKeys();
const ctrlEnterSend = useSetting(SettingIds.CtrlEnterToSend);
const fileInput = ref(null);
+onMounted(() => {
+ // Wait 0.3s for the dialog to open
+ setTimeout(() => {
+ document.getElementById("text-input")?.focus();
+ }, 300);
+});
+
watch([Control_Enter, Command_Enter], () => {
if (sending.value || !ctrlEnterSend.value.value) {
return;
@@ -296,4 +303,4 @@ const visibilities = {
text: m.lucky_mean_robin_link(),
},
};
-
\ No newline at end of file
+
diff --git a/components/composer/dialog.vue b/components/composer/dialog.vue
index 86213ff..102d419 100644
--- a/components/composer/dialog.vue
+++ b/components/composer/dialog.vue
@@ -44,8 +44,11 @@ useListen("composer:quote", (note) => {
useListen("composer:close", () => {
open.value = false;
relation.value = null;
+ // Unfocus the active element
+ activeElement.value?.blur();
});
+const activeElement = useActiveElement();
const open = ref(false);
const relation = ref(
null as {
@@ -57,7 +60,12 @@ const relation = ref(
-
\ No newline at end of file
+