Merge pull request #2786 from SillyTavern/textarea-revert-nyxFix

initial reversion commit
This commit is contained in:
Cohee 2024-09-05 20:29:36 +03:00 committed by GitHub
commit 758c90be00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 79 additions and 70 deletions

View File

@ -494,12 +494,15 @@
} }
input:disabled, input:disabled,
textarea:disabled, textarea:disabled {
#AdvancedFormatting .disabled {
cursor: not-allowed; cursor: not-allowed;
filter: brightness(0.5); filter: brightness(0.5);
} }
#AdvancedFormatting .disabled {
filter: brightness(0.5);
}
.debug-red { .debug-red {
border: 1px solid red !important; border: 1px solid red !important;
} }

View File

@ -3089,14 +3089,14 @@
<small data-i18n="Story String">Story String</small> <small data-i18n="Story String">Story String</small>
<i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="context_story_string" title="Expand the editor" data-i18n="[title]Expand the editor"></i> <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="context_story_string" title="Expand the editor" data-i18n="[title]Expand the editor"></i>
</label> </label>
<div contenteditable="true" id="context_story_string" class="text_pole textarea_compact"></div> <textarea id="context_story_string" class="text_pole textarea_compact autoSetHeight"></textarea>
<div class="flex-container"> <div class="flex-container">
<div class="flex1"> <div class="flex1">
<label for="context_example_separator"> <label for="context_example_separator">
<small data-i18n="Example Separator">Example Separator</small> <small data-i18n="Example Separator">Example Separator</small>
</label> </label>
<div> <div>
<div contenteditable="true" id="context_example_separator" class="text_pole textarea_compact"></div> <textarea id="context_example_separator" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
<div class="flex1"> <div class="flex1">
@ -3104,7 +3104,7 @@
<small data-i18n="Chat Start">Chat Start</small> <small data-i18n="Chat Start">Chat Start</small>
</label> </label>
<div> <div>
<div contenteditable="true" id="context_chat_start" class="text_pole textarea_compact"></div> <textarea id="context_chat_start" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
</div> </div>
@ -3182,7 +3182,7 @@
</small> </small>
</div> </div>
<div> <div>
<div contenteditable="true" id="custom_stopping_strings" class="text_pole textarea_compact monospace"></div> <textarea id="custom_stopping_strings" class="text_pole textarea_compact monospace autoSetHeight"></textarea>
</div> </div>
<label class="checkbox_label" for="custom_stopping_strings_macro"> <label class="checkbox_label" for="custom_stopping_strings_macro">
<input id="custom_stopping_strings_macro" type="checkbox" checked> <input id="custom_stopping_strings_macro" type="checkbox" checked>
@ -3241,7 +3241,7 @@
<small data-i18n="System Prompt">System Prompt</small> <small data-i18n="System Prompt">System Prompt</small>
<i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="instruct_system_prompt" title="Expand the editor" data-i18n="[title]Expand the editor"></i> <i class="editor_maximize fa-solid fa-maximize right_menu_button" data-for="instruct_system_prompt" title="Expand the editor" data-i18n="[title]Expand the editor"></i>
</label> </label>
<div contenteditable="true" id="instruct_system_prompt" class="text_pole textarea_compact"></div> <textarea id="instruct_system_prompt" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
<div> <div>
@ -3323,7 +3323,7 @@
</span> </span>
</small> </small>
<div> <div>
<div contenteditable="true" id="start_reply_with" class="text_pole textarea_compact"></div> <textarea id="start_reply_with" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
<label class="checkbox_label" for="chat-show-reply-prefix-checkbox"> <label class="checkbox_label" for="chat-show-reply-prefix-checkbox">
<input id="chat-show-reply-prefix-checkbox" type="checkbox" /> <input id="chat-show-reply-prefix-checkbox" type="checkbox" />
@ -3353,7 +3353,7 @@
<small data-i18n="System Prompt Prefix">System Prompt Prefix</small> <small data-i18n="System Prompt Prefix">System Prompt Prefix</small>
</label> </label>
<div> <div>
<div contenteditable="true" id="instruct_system_sequence_prefix" class="text_pole textarea_compact"></div> <textarea id="instruct_system_sequence_prefix" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
<div class="flexAuto" title="Inserted after a System prompt." data-i18n="[title]Inserted after a System prompt."> <div class="flexAuto" title="Inserted after a System prompt." data-i18n="[title]Inserted after a System prompt.">
@ -3361,38 +3361,38 @@
<small data-i18n="System Prompt Suffix">System Prompt Suffix</small> <small data-i18n="System Prompt Suffix">System Prompt Suffix</small>
</label> </label>
<div> <div>
<div contenteditable="true" id="instruct_system_sequence_suffix" class="text_pole wide100p textarea_compact"></div> <textarea id="instruct_system_sequence_suffix" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
</div> </div>
<div class="flex-container"> <div class="flex-container">
<div class="flexAuto" title="Inserted before a User message and as a last prompt line when impersonating." data-i18n="[title]Inserted before a User message and as a last prompt line when impersonating."> <div class="flexAuto" title="Inserted before a User message and as a last prompt line when impersonating." data-i18n="[title]Inserted before a User message and as a last prompt line when impersonating.">
<small data-i18n="User Prefix">User Message Prefix</small> <small data-i18n="User Prefix">User Message Prefix</small>
<div contenteditable="true" id="instruct_input_sequence" class="text_pole textarea_compact"></div> <textarea id="instruct_input_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
<div class="flexAuto" title="Inserted after a User message." data-i18n="[title]Inserted after a User message."> <div class="flexAuto" title="Inserted after a User message." data-i18n="[title]Inserted after a User message.">
<small data-i18n="User Suffix">User Message Suffix</small> <small data-i18n="User Suffix">User Message Suffix</small>
<div contenteditable="true" id="instruct_input_suffix" class="text_pole wide100p textarea_compact"></div> <textarea id="instruct_input_suffix" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
<div class="flex-container"> <div class="flex-container">
<div class="flexAuto" title="Inserted before an Assistant message and as a last prompt line when generating an AI reply." data-i18n="[title]Inserted before an Assistant message and as a last prompt line when generating an AI reply."> <div class="flexAuto" title="Inserted before an Assistant message and as a last prompt line when generating an AI reply." data-i18n="[title]Inserted before an Assistant message and as a last prompt line when generating an AI reply.">
<small data-i18n="Assistant Prefix">Assistant Message Prefix</small> <small data-i18n="Assistant Prefix">Assistant Message Prefix</small>
<div contenteditable="true" id="instruct_output_sequence" class="text_pole wide100p textarea_compact"></div> <textarea id="instruct_output_sequence" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
</div> </div>
<div class="flexAuto" title="Inserted after an Assistant message." data-i18n="[title]Inserted after an Assistant message."> <div class="flexAuto" title="Inserted after an Assistant message." data-i18n="[title]Inserted after an Assistant message.">
<small data-i18n="Assistant Suffix">Assistant Message Suffix</small> <small data-i18n="Assistant Suffix">Assistant Message Suffix</small>
<div contenteditable="true" id="instruct_output_suffix" class="text_pole wide100p textarea_compact"></div> <textarea id="instruct_output_suffix" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
<div class="flex-container"> <div class="flex-container">
<div class="flexAuto" id="instruct_system_sequence_block" title="Inserted before a System (added by slash commands or extensions) message." data-i18n="[title]Inserted before a System (added by slash commands or extensions) message."> <div class="flexAuto" id="instruct_system_sequence_block" title="Inserted before a System (added by slash commands or extensions) message." data-i18n="[title]Inserted before a System (added by slash commands or extensions) message.">
<small data-i18n="System Prefix">System Message Prefix</small> <small data-i18n="System Prefix">System Message Prefix</small>
<div contenteditable="true" id="instruct_system_sequence" class="text_pole textarea_compact"></div> <textarea id="instruct_system_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
<div class="flexAuto" id="instruct_system_suffix_block" title="Inserted after a System message." data-i18n="[title]Inserted after a System message."> <div class="flexAuto" id="instruct_system_suffix_block" title="Inserted after a System message." data-i18n="[title]Inserted after a System message.">
<small data-i18n="System Suffix">System Message Suffix</small> <small data-i18n="System Suffix">System Message Suffix</small>
<div contenteditable="true" id="instruct_system_suffix" class="text_pole wide100p textarea_compact"></div> <textarea id="instruct_system_suffix" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
<div class="flexBasis100p" title="If enabled, System Sequences will be the same as User Sequences." data-i18n="[title]If enabled, System Sequences will be the same as User Sequences."> <div class="flexBasis100p" title="If enabled, System Sequences will be the same as User Sequences." data-i18n="[title]If enabled, System Sequences will be the same as User Sequences.">
@ -3408,37 +3408,37 @@
<div class="flex-container"> <div class="flex-container">
<div class="flexAuto" title="Inserted before the first Assistant's message." data-i18n="[title]Inserted before the first Assistant's message."> <div class="flexAuto" title="Inserted before the first Assistant's message." data-i18n="[title]Inserted before the first Assistant's message.">
<small data-i18n="First Assistant Prefix">First Assistant Prefix</small> <small data-i18n="First Assistant Prefix">First Assistant Prefix</small>
<div contenteditable="true" id="instruct_first_output_sequence" class="text_pole textarea_compact"></div> <textarea id="instruct_first_output_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
<div class="flexAuto" title="Inserted before the last Assistant's message or as a last prompt line when generating an AI reply (except a neutral/system role)." data-i18n="[title]instruct_last_output_sequence"> <div class="flexAuto" title="Inserted before the last Assistant's message or as a last prompt line when generating an AI reply (except a neutral/system role)." data-i18n="[title]instruct_last_output_sequence">
<small data-i18n="Last Assistant Prefix">Last Assistant Prefix</small> <small data-i18n="Last Assistant Prefix">Last Assistant Prefix</small>
<div contenteditable="true" id="instruct_last_output_sequence" class="text_pole wide100p textarea_compact"></div> <textarea id="instruct_last_output_sequence" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
<div class="flex-container"> <div class="flex-container">
<div class="flexAuto" title="Inserted before the first User's message." data-i18n="[title]Inserted before the first User's message."> <div class="flexAuto" title="Inserted before the first User's message." data-i18n="[title]Inserted before the first User's message.">
<small data-i18n="First User Prefix">First User Prefix</small> <small data-i18n="First User Prefix">First User Prefix</small>
<div contenteditable="true" id="instruct_first_input_sequence" class="text_pole textarea_compact"></div> <textarea id="instruct_first_input_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
<div class="flexAuto" title="Inserted before the last User's message." data-i18n="[title]instruct_last_input_sequence"> <div class="flexAuto" title="Inserted before the last User's message." data-i18n="[title]instruct_last_input_sequence">
<small data-i18n="Last User Prefix">Last User Prefix</small> <small data-i18n="Last User Prefix">Last User Prefix</small>
<div contenteditable="true" id="instruct_last_input_sequence" class="text_pole wide100p textarea_compact"></div> <textarea id="instruct_last_input_sequence" class="text_pole wide100p textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
<div class="flex-container"> <div class="flex-container">
<div class="flexAuto" title="Will be inserted as a last prompt line when using system/neutral generation." data-i18n="[title]Will be inserted as a last prompt line when using system/neutral generation."> <div class="flexAuto" title="Will be inserted as a last prompt line when using system/neutral generation." data-i18n="[title]Will be inserted as a last prompt line when using system/neutral generation.">
<small data-i18n="System Instruction Prefix">System Instruction Prefix</small> <small data-i18n="System Instruction Prefix">System Instruction Prefix</small>
<div contenteditable="true" id="instruct_last_system_sequence" class="text_pole textarea_compact"></div> <textarea id="instruct_last_system_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
<div class="flexAuto" title="If a stop sequence is generated, everything past it will be removed from the output (inclusive)." data-i18n="[title]If a stop sequence is generated, everything past it will be removed from the output (inclusive)."> <div class="flexAuto" title="If a stop sequence is generated, everything past it will be removed from the output (inclusive)." data-i18n="[title]If a stop sequence is generated, everything past it will be removed from the output (inclusive).">
<small data-i18n="Stop Sequence">Stop Sequence</small> <small data-i18n="Stop Sequence">Stop Sequence</small>
<div contenteditable="true" id="instruct_stop_sequence" class="text_pole textarea_compact"></div> <textarea id="instruct_stop_sequence" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
<div class="flex-container"> <div class="flex-container">
<div class="flexAuto" title="Will be inserted at the start of the chat history if it doesn't start with a User message." data-i18n="[title]Will be inserted at the start of the chat history if it doesn't start with a User message."> <div class="flexAuto" title="Will be inserted at the start of the chat history if it doesn't start with a User message." data-i18n="[title]Will be inserted at the start of the chat history if it doesn't start with a User message.">
<small data-i18n="User Filler Message">User Filler Message</small> <small data-i18n="User Filler Message">User Filler Message</small>
<div contenteditable="true" id="instruct_user_alignment_message" class="text_pole textarea_compact"></div> <textarea id="instruct_user_alignment_message" class="text_pole textarea_compact autoSetHeight"></textarea>
</div> </div>
</div> </div>
</div> </div>

View File

@ -10616,10 +10616,12 @@ jQuery(async function () {
} }
// Set the height of "autoSetHeight" textareas within the drawer to their scroll height // Set the height of "autoSetHeight" textareas within the drawer to their scroll height
if (!CSS.supports('field-sizing', 'content')) {
$(this).closest('.drawer').find('.drawer-content textarea.autoSetHeight').each(async function () { $(this).closest('.drawer').find('.drawer-content textarea.autoSetHeight').each(async function () {
await resetScrollHeight($(this)); await resetScrollHeight($(this));
return; return;
}); });
}
} else if (drawerWasOpenAlready) { //to close manually } else if (drawerWasOpenAlready) { //to close manually
icon.toggleClass('closedIcon openIcon'); icon.toggleClass('closedIcon openIcon');
@ -10691,10 +10693,12 @@ jQuery(async function () {
$(this).closest('.inline-drawer').find('.inline-drawer-content').stop().slideToggle(); $(this).closest('.inline-drawer').find('.inline-drawer-content').stop().slideToggle();
// Set the height of "autoSetHeight" textareas within the inline-drawer to their scroll height // Set the height of "autoSetHeight" textareas within the inline-drawer to their scroll height
if (!CSS.supports('field-sizing', 'content')) {
$(this).closest('.inline-drawer').find('.inline-drawer-content textarea.autoSetHeight').each(async function () { $(this).closest('.inline-drawer').find('.inline-drawer-content textarea.autoSetHeight').each(async function () {
await resetScrollHeight($(this)); await resetScrollHeight($(this));
return; return;
}); });
}
}); });
$(document).on('click', '.inline-drawer-maximize', function () { $(document).on('click', '.inline-drawer-maximize', function () {

View File

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

View File

@ -7,7 +7,7 @@ import {
power_user, power_user,
context_presets, context_presets,
} from './power-user.js'; } from './power-user.js';
import { regexFromString } from './utils.js'; import { regexFromString, resetScrollHeight } from './utils.js';
/** /**
* @type {any[]} Instruct mode presets. * @type {any[]} Instruct mode presets.
@ -95,11 +95,14 @@ export async function loadInstructMode(data) {
if (control.isCheckbox) { if (control.isCheckbox) {
$element.prop('checked', power_user.instruct[control.property]); $element.prop('checked', power_user.instruct[control.property]);
} else { } else {
$element[0].innerText = (power_user.instruct[control.property]); $element.val(power_user.instruct[control.property]);
} }
$element.on('input', async function () { $element.on('input', async function () {
power_user.instruct[control.property] = control.isCheckbox ? !!$(this).prop('checked') : $(this)[0].innerText; power_user.instruct[control.property] = control.isCheckbox ? !!$(this).prop('checked') : $(this).val();
if (!CSS.supports('field-sizing', 'content')) {
await resetScrollHeight($(this));
}
saveSettingsDebounced(); saveSettingsDebounced();
}); });
@ -108,9 +111,6 @@ export async function loadInstructMode(data) {
} }
}); });
$('#instruct_system_sequence').css('height', 'auto');
$('#instruct_system_suffix').css('height', 'auto');
instruct_presets.forEach((preset) => { instruct_presets.forEach((preset) => {
const name = preset.name; const name = preset.name;
const option = document.createElement('option'); const option = document.createElement('option');
@ -611,13 +611,13 @@ jQuery(() => {
if (state) { if (state) {
$('#instruct_system_sequence_block').addClass('disabled'); $('#instruct_system_sequence_block').addClass('disabled');
$('#instruct_system_suffix_block').addClass('disabled'); $('#instruct_system_suffix_block').addClass('disabled');
$('#instruct_system_sequence').prop('contenteditable', false); $('#instruct_system_sequence').prop('readOnly', true);
$('#instruct_system_suffix').prop('contenteditable', false); $('#instruct_system_suffix').prop('readOnly', true);
} else { } else {
$('#instruct_system_sequence_block').removeClass('disabled'); $('#instruct_system_sequence_block').removeClass('disabled');
$('#instruct_system_suffix_block').removeClass('disabled'); $('#instruct_system_suffix_block').removeClass('disabled');
$('#instruct_system_sequence').prop('contenteditable', true); $('#instruct_system_sequence').prop('readOnly', false);
$('#instruct_system_suffix').prop('contenteditable', true); $('#instruct_system_suffix').prop('readOnly', false);
} }
}); });
@ -663,7 +663,7 @@ jQuery(() => {
if (control.isCheckbox) { if (control.isCheckbox) {
$element.prop('checked', power_user.instruct[control.property]).trigger('input'); $element.prop('checked', power_user.instruct[control.property]).trigger('input');
} else { } else {
$element[0].innerText = (power_user.instruct[control.property]); $element.val(power_user.instruct[control.property]);
$element.trigger('input'); $element.trigger('input');
} }
} }

View File

@ -5281,9 +5281,11 @@ $(document).ready(async function () {
saveSettingsDebounced(); saveSettingsDebounced();
}); });
if (!CSS.supports('field-sizing', 'content')) {
$(document).on('input', '#openai_settings .autoSetHeight', function () { $(document).on('input', '#openai_settings .autoSetHeight', function () {
resetScrollHeight($(this)); resetScrollHeight($(this));
}); });
}
if (!isMobile()) { if (!isMobile()) {
$('#model_openrouter_select').select2({ $('#model_openrouter_select').select2({

View File

@ -1740,20 +1740,23 @@ async function loadContextSettings() {
if (control.isCheckbox) { if (control.isCheckbox) {
$element.prop('checked', power_user.context[control.property]); $element.prop('checked', power_user.context[control.property]);
} else { } else {
$element[0].innerText = power_user.context[control.property]; $element.val(power_user.context[control.property]);
} }
console.log(`Setting ${$element.prop('id')} to ${power_user.context[control.property]}`); console.log(`Setting ${$element.prop('id')} to ${power_user.context[control.property]}`);
// If the setting already exists, no need to duplicate it // If the setting already exists, no need to duplicate it
// TODO: Maybe check the power_user object for the setting instead of a flag? // TODO: Maybe check the power_user object for the setting instead of a flag?
$element.on('input keyup', async function () { $element.on('input', async function () {
const value = control.isCheckbox ? !!$(this).prop('checked') : $(this)[0].innerText; const value = control.isCheckbox ? !!$(this).prop('checked') : $(this).val();
if (control.isGlobalSetting) { if (control.isGlobalSetting) {
power_user[control.property] = value; power_user[control.property] = value;
} else { } else {
power_user.context[control.property] = value; power_user.context[control.property] = value;
} }
console.log(`Setting ${$element.prop('id')} to ${value}`);
if (!CSS.supports('field-sizing', 'content')) {
await resetScrollHeight($(this));
}
saveSettingsDebounced(); saveSettingsDebounced();
}); });
}); });
@ -1793,7 +1796,7 @@ async function loadContextSettings() {
.prop('checked', control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property]) .prop('checked', control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property])
.trigger('input'); .trigger('input');
} else { } else {
$element[0].innerText = (control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property]); $element.val(control.isGlobalSetting ? power_user[control.property] : power_user.context[control.property]);
$element.trigger('input'); $element.trigger('input');
} }
} }
@ -3096,7 +3099,7 @@ $(document).ready(() => {
}); });
$('#start_reply_with').on('input', function () { $('#start_reply_with').on('input', function () {
power_user.user_prompt_bias = String($(this)[0].innerText); power_user.user_prompt_bias = String($(this).val());
saveSettingsDebounced(); saveSettingsDebounced();
}); });
@ -3628,7 +3631,7 @@ $(document).ready(() => {
}); });
$('#custom_stopping_strings').on('input', function () { $('#custom_stopping_strings').on('input', function () {
power_user.custom_stopping_strings = String($(this)[0].innerText).trim(); power_user.custom_stopping_strings = String($(this).val()).trim();
saveSettingsDebounced(); saveSettingsDebounced();
}); });

View File

@ -2028,8 +2028,10 @@ export function toggleDrawer(drawer, expand = true) {
} }
// Set the height of "autoSetHeight" textareas within the inline-drawer to their scroll height // Set the height of "autoSetHeight" textareas within the inline-drawer to their scroll height
if (!CSS.supports('field-sizing', 'content')) {
content.querySelectorAll('textarea.autoSetHeight').forEach(resetScrollHeight); content.querySelectorAll('textarea.autoSetHeight').forEach(resetScrollHeight);
} }
}
export async function fetchFaFile(name) { export async function fetchFaFile(name) {
const style = document.createElement('style'); const style = document.createElement('style');

View File

@ -1176,6 +1176,7 @@ textarea {
textarea.autoSetHeight { textarea.autoSetHeight {
max-height: 50vh; max-height: 50vh;
max-height: 50dvh; max-height: 50dvh;
field-sizing: content;
} }
input, input,
@ -5454,16 +5455,6 @@ body:not(.movingUI) .drawer-content.maximized {
opacity: 0.7; opacity: 0.7;
} }
#advanced-formatting-button div[contenteditable] { #AdvancedFormatting .autoSetHeight {
overflow-wrap: anywhere; overflow-wrap: anywhere;
max-height: 50vh;
max-height: 50dvh;
resize: vertical;
overflow: auto;
min-height: 1.8em;
white-space: preserve-breaks;
}
div[contenteditable] br {
display: revert;
} }