Use CSS.supports to determine auto-fit validity

This commit is contained in:
Cohee
2024-09-05 20:00:45 +03:00
parent 8e1dad6800
commit ac0c33eb76
6 changed files with 18 additions and 25 deletions

View File

@ -1491,9 +1491,11 @@ function select_group_chats(groupId, skipAnimation) {
}
// Toggle textbox sizes, as input events have not fired here
$('#rm_group_chats_block .autoSetHeight').each(element => {
resetScrollHeight(element);
});
if (!CSS.supports('field-sizing', 'content')) {
$('#rm_group_chats_block .autoSetHeight').each(element => {
resetScrollHeight(element);
});
}
eventSource.emit('groupSelected', { detail: { id: openGroupId, group: group } });
}
@ -1965,7 +1967,9 @@ function doCurMemberListPopout() {
jQuery(() => {
$(document).on('input', '#rm_group_chats_block .autoSetHeight', function () {
resetScrollHeight($(this));
if (!CSS.supports('field-sizing', 'content')) {
resetScrollHeight($(this));
}
});
$(document).on('click', '.group_select', function () {