mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-02 10:57:45 +01:00
Fix unfocusing tag input when switching characters
This commit is contained in:
parent
a789c6f76f
commit
ad450981c0
@ -5351,9 +5351,12 @@ async function getChat() {
|
||||
await getChatResult();
|
||||
eventSource.emit('chatLoaded', { detail: { id: this_chid, character: characters[this_chid] } });
|
||||
|
||||
// Focus on the textarea if not already focused on a visible text input
|
||||
setTimeout(function () {
|
||||
$('#send_textarea').click();
|
||||
$('#send_textarea').focus();
|
||||
if ($(document.activeElement).is('input:visible, textarea:visible')) {
|
||||
return;
|
||||
}
|
||||
$('#send_textarea').trigger('click').trigger('focus');
|
||||
}, 200);
|
||||
} catch (error) {
|
||||
await getChatResult();
|
||||
|
Loading…
x
Reference in New Issue
Block a user