mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
proper input focus retention for options/send_but
This commit is contained in:
@@ -1844,7 +1844,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<form id="send_form" class="no-connection">
|
<form id="send_form" class="no-connection">
|
||||||
<div id="options_button" class="fa-solid fa-bars"></div>
|
<div id="options_button" class="fa-solid fa-bars"></div>
|
||||||
<textarea id="send_textarea" placeholder="Not connected to API!" onSubmit="this.focus()" name="text"></textarea>
|
<textarea id="send_textarea" placeholder="Not connected to API!" name="text"></textarea>
|
||||||
<div id="send_but_sheld">
|
<div id="send_but_sheld">
|
||||||
<div id="loading_mes">
|
<div id="loading_mes">
|
||||||
<div alt="" class="fa-solid fa-fade fa-hourglass-half"></div>
|
<div alt="" class="fa-solid fa-fade fa-hourglass-half"></div>
|
||||||
|
@@ -3750,6 +3750,7 @@ $(document).ready(function () {
|
|||||||
if (is_send_press == false) {
|
if (is_send_press == false) {
|
||||||
is_send_press = true;
|
is_send_press = true;
|
||||||
Generate();
|
Generate();
|
||||||
|
$('#send_textarea').focus();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -4339,6 +4340,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
$("#options_button").click(function () {
|
$("#options_button").click(function () {
|
||||||
// this is the options button click function, shows the options menu if closed
|
// this is the options button click function, shows the options menu if closed
|
||||||
|
$("#send_textarea").focus();
|
||||||
if (
|
if (
|
||||||
$("#options").css("display") === "none" &&
|
$("#options").css("display") === "none" &&
|
||||||
$("#options").css("opacity") == 0.0
|
$("#options").css("opacity") == 0.0
|
||||||
@@ -4359,7 +4361,7 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
$("#options [id]").on("click", function () {
|
$("#options [id]").on("click", function () {
|
||||||
var id = $(this).attr("id");
|
var id = $(this).attr("id");
|
||||||
|
$("#send_textarea").focus();
|
||||||
if (id == "option_select_chat") {
|
if (id == "option_select_chat") {
|
||||||
if (selected_group) {
|
if (selected_group) {
|
||||||
// will open a chat selection screen
|
// will open a chat selection screen
|
||||||
|
Reference in New Issue
Block a user