mirror of
https://github.com/thelounge/thelounge.git
synced 2024-06-07 08:12:19 +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(
|
||||||
watch(editTopicRef, (newTopic) => {
|
() => props.channel.editTopic,
|
||||||
if (newTopic) {
|
(newTopic) => {
|
||||||
void nextTick(() => {
|
if (newTopic) {
|
||||||
topicInput.value?.focus();
|
void nextTick(() => {
|
||||||
});
|
topicInput.value?.focus();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
);
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
channelChanged();
|
channelChanged();
|
||||||
|
@ -260,7 +262,6 @@ export default defineComponent({
|
||||||
messageList,
|
messageList,
|
||||||
topicInput,
|
topicInput,
|
||||||
specialComponent,
|
specialComponent,
|
||||||
editTopicRef,
|
|
||||||
hideUserVisibleError,
|
hideUserVisibleError,
|
||||||
editTopic,
|
editTopic,
|
||||||
saveTopic,
|
saveTopic,
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<i class="account"> [{{ message.account }}]</i>
|
<i class="account"> [{{ message.account }}]</i>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="message.gecos">
|
<template v-if="message.gecos">
|
||||||
<i class="realname"> {{ message.gecos }} </i>
|
<i class="realname"> {{ message.gecos }}</i>
|
||||||
</template>
|
</template>
|
||||||
has joined the channel
|
has joined the channel
|
||||||
</span>
|
</span>
|
||||||
|
|
|
@ -2,7 +2,7 @@ import socket from "../socket";
|
||||||
import {store} from "../store";
|
import {store} from "../store";
|
||||||
import {switchToChannel} from "../router";
|
import {switchToChannel} from "../router";
|
||||||
|
|
||||||
function input(args) {
|
function input(args: string[]) {
|
||||||
if (args.length > 0) {
|
if (args.length > 0) {
|
||||||
let channels = args[0];
|
let channels = args[0];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue