mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
- escape from edit message now focuses on send_textarea
- allow swipes to happen when send_textarea is focused but empty
This commit is contained in:
@ -655,11 +655,23 @@ $("document").ready(function () {
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function isInputElementInFocus() {
|
||||
return $(document.activeElement).is(":input");
|
||||
//return $(document.activeElement).is(":input");
|
||||
var focused = $(':focus');
|
||||
if (focused.is('input') || focused.is('textarea')) {
|
||||
if (focused.attr('id') === 'send_textarea') {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//Additional hotkeys CTRL+ENTER and CTRL+UPARROW
|
||||
document.addEventListener("keydown", (event) => {
|
||||
if (event.ctrlKey && event.key == "Enter") {
|
||||
|
Reference in New Issue
Block a user