mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fix options menu jumping around the screen on delete select
This commit is contained in:
@ -4427,6 +4427,29 @@ function updateMessage(div) {
|
|||||||
return { mesBlock, text, mes, bias };
|
return { mesBlock, text, mes, bias };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function openMessageDelete() {
|
||||||
|
closeMessageEditor();
|
||||||
|
hideSwipeButtons();
|
||||||
|
if ((this_chid != undefined && !is_send_press) || (selected_group && !is_group_generating)) {
|
||||||
|
$("#dialogue_del_mes").css("display", "block");
|
||||||
|
$("#send_form").css("display", "none");
|
||||||
|
$(".del_checkbox").each(function () {
|
||||||
|
if ($(this).parent().attr("mesid") != 0) {
|
||||||
|
$(this).css("display", "block");
|
||||||
|
$(this).parent().children(".for_checkbox").css("display", "none");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
console.debug(`
|
||||||
|
ERR -- could not enter del mode
|
||||||
|
this_chid: ${this_chid}
|
||||||
|
is_send_press: ${is_send_press}
|
||||||
|
selected_group: ${selected_group}
|
||||||
|
is_group_generating: ${is_group_generating}`);
|
||||||
|
}
|
||||||
|
is_delete_mode = true;
|
||||||
|
}
|
||||||
|
|
||||||
function messageEditAuto(div) {
|
function messageEditAuto(div) {
|
||||||
const { mesBlock, text, mes } = updateMessage(div);
|
const { mesBlock, text, mes } = updateMessage(div);
|
||||||
|
|
||||||
@ -6536,26 +6559,7 @@ $(document).ready(function () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (id == "option_delete_mes") {
|
else if (id == "option_delete_mes") {
|
||||||
closeMessageEditor();
|
setTimeout(openMessageDelete, animation_duration);
|
||||||
hideSwipeButtons();
|
|
||||||
if ((this_chid != undefined && !is_send_press) || (selected_group && !is_group_generating)) {
|
|
||||||
$("#dialogue_del_mes").css("display", "block");
|
|
||||||
$("#send_form").css("display", "none");
|
|
||||||
$(".del_checkbox").each(function () {
|
|
||||||
if ($(this).parent().attr("mesid") != 0) {
|
|
||||||
$(this).css("display", "block");
|
|
||||||
$(this).parent().children(".for_checkbox").css("display", "none");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
console.debug(`
|
|
||||||
ERR -- could not enter del mode
|
|
||||||
this_chid: ${this_chid}
|
|
||||||
is_send_press: ${is_send_press}
|
|
||||||
selected_group: ${selected_group}
|
|
||||||
is_group_generating: ${is_group_generating}`)
|
|
||||||
}
|
|
||||||
is_delete_mode = true;
|
|
||||||
}
|
}
|
||||||
hideMenu();
|
hideMenu();
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user