Update Chat

This commit is contained in:
anhkha2003 2023-09-24 23:31:38 -05:00
parent 10f3390f3a
commit bd8d7848b9
6 changed files with 50 additions and 27 deletions

View file

@ -559,16 +559,14 @@
register_setting();
color_selected_room();
// Adjust textarea height to fit the content
$(document).ready(function() {
$('#chat-input').on('input', function() {
if (this.scrollHeight > this.clientHeight) {
this.style.height = 'auto';
this.style.height = (this.scrollHeight) + 'px';
} else {
$(this).css('height', '80%');
}
});
$('#chat-input').on('input', function() {
if (this.scrollHeight > this.clientHeight) {
this.style.height = (this.scrollHeight) + 'px';
$(this).css('border-radius', '30px');
} else {
$(this).css('height', '80%');
}
});
$('#submit-button').on('click', submit_chat);
});
</script>