diff --git a/js/src/components/Comment/EventComment.vue b/js/src/components/Comment/EventComment.vue index 4792553fd..d0069c250 100644 --- a/js/src/components/Comment/EventComment.vue +++ b/js/src/components/Comment/EventComment.vue @@ -194,6 +194,8 @@ has-modal-card ref="reportModal" :close-button-aria-label="t('Close')" + :autoFocus="false" + :trapFocus="false" > -
-
-
-
-
- -
- -
-
-
- {{ comment?.actor?.name }} - @{{ usernameWithDomain(comment?.actor) }} -
-

-
-
-
-
+
+
+
+
+ +
+ +
+
+ {{ comment?.actor?.name }} + @{{ usernameWithDomain(comment?.actor) }} +
+

+
+
- +
@@ -91,6 +93,7 @@ import { useI18n } from "vue-i18n"; import { IComment } from "../../types/comment.model"; import { usernameWithDomain } from "@/types/actor"; import AccountCircle from "vue-material-design-icons/AccountCircle.vue"; +import { useFocus } from "@vueuse/core"; const props = withDefaults( defineProps<{ @@ -108,18 +111,17 @@ const props = withDefaults( const emit = defineEmits(["close"]); -// @Component({ -// mounted() { -// this.$data.isActive = true; -// }, -// }) - -// isActive = false; - const content = ref(""); const forward = ref(false); +const reportAdditionalCommentsInput = ref(); +// https://github.com/oruga-ui/oruga/issues/339 +const reportAdditionalCommentsInputComp = computed( + () => reportAdditionalCommentsInput.value?.$refs.textarea +); +useFocus(reportAdditionalCommentsInputComp, { initialValue: true }); + const { t } = useI18n({ useScope: "global" }); const translatedCancelText = computed((): string => { diff --git a/js/src/components/core/CustomDialog.vue b/js/src/components/core/CustomDialog.vue index c2de32cf4..df802e044 100644 --- a/js/src/components/core/CustomDialog.vue +++ b/js/src/components/core/CustomDialog.vue @@ -31,6 +31,7 @@ ref="input" v-bind="inputAttrs" @keydown.enter="confirm" + autofocus />
@@ -48,6 +49,7 @@