| 10647 | $(document).on('click', '.open_alternate_greetings', openAlternateGreetings); | 10647 | $(document).on('click', '.open_alternate_greetings', openAlternateGreetings); |
| 10648 | /* $('#set_character_world').on('click', openCharacterWorldPopup); */ | 10648 | /* $('#set_character_world').on('click', openCharacterWorldPopup); */ |
| 10649 | | 10649 | |
| | 10650 | $(document).on('focus', 'input.auto-select, textarea.auto-select', function () { |
| | 10651 | const control = $(this)[0]; |
| | 10652 | if (control instanceof HTMLInputElement || control instanceof HTMLTextAreaElement) { |
| | 10653 | control.select(); |
| | 10654 | console.debug('Auto-selecting content of input control', control); |
| | 10655 | } |
| | 10656 | }); |
| | 10657 | |
| 10650 | $(document).keyup(function (e) { | 10658 | $(document).keyup(function (e) { |
| 10651 | if (e.key === 'Escape') { | 10659 | if (e.key === 'Escape') { |
| 10652 | const isEditVisible = $('#curEditTextarea').is(':visible'); | 10660 | const isEditVisible = $('#curEditTextarea').is(':visible'); |