mirror of
https://github.com/thelounge/thelounge.git
synced 2024-05-17 13:46:36 +02:00
Fix focusing on topic when using ctx menu Edit Topic action
This commit is contained in:
parent
73014369c4
commit
5b4166ff30
|
@ -236,14 +236,16 @@ export default defineComponent({
|
|||
}
|
||||
);
|
||||
|
||||
const editTopicRef = ref(props.channel.editTopic);
|
||||
watch(editTopicRef, (newTopic) => {
|
||||
if (newTopic) {
|
||||
void nextTick(() => {
|
||||
topicInput.value?.focus();
|
||||
});
|
||||
watch(
|
||||
() => props.channel.editTopic,
|
||||
(newTopic) => {
|
||||
if (newTopic) {
|
||||
void nextTick(() => {
|
||||
topicInput.value?.focus();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
);
|
||||
|
||||
onMounted(() => {
|
||||
channelChanged();
|
||||
|
@ -260,7 +262,6 @@ export default defineComponent({
|
|||
messageList,
|
||||
topicInput,
|
||||
specialComponent,
|
||||
editTopicRef,
|
||||
hideUserVisibleError,
|
||||
editTopic,
|
||||
saveTopic,
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<i class="account"> [{{ message.account }}]</i>
|
||||
</template>
|
||||
<template v-if="message.gecos">
|
||||
<i class="realname"> {{ message.gecos }} </i>
|
||||
<i class="realname"> {{ message.gecos }}</i>
|
||||
</template>
|
||||
has joined the channel
|
||||
</span>
|
||||
|
|
|
@ -2,7 +2,7 @@ import socket from "../socket";
|
|||
import {store} from "../store";
|
||||
import {switchToChannel} from "../router";
|
||||
|
||||
function input(args) {
|
||||
function input(args: string[]) {
|
||||
if (args.length > 0) {
|
||||
let channels = args[0];
|
||||
|
||||
|
|
Loading…
Reference in a new issue