diff --git a/public/script.js b/public/script.js index dd6af9884..de922428c 100644 --- a/public/script.js +++ b/public/script.js @@ -10647,6 +10647,14 @@ jQuery(async function () { $(document).on('click', '.open_alternate_greetings', openAlternateGreetings); /* $('#set_character_world').on('click', openCharacterWorldPopup); */ + $(document).on('focus', 'input.auto-select, textarea.auto-select', function () { + const control = $(this)[0]; + if (control instanceof HTMLInputElement || control instanceof HTMLTextAreaElement) { + control.select(); + console.debug('Auto-selecting content of input control', control); + } + }); + $(document).keyup(function (e) { if (e.key === 'Escape') { const isEditVisible = $('#curEditTextarea').is(':visible');