Limit edit textarea height to 75%

0a0fc0141c5e7aa91b0c6386cdaf78efdb0fdd59

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +4 -1Showing whitespace changes
public/script.js+2 -1
@@ -9242,7 +9242,8 @@ jQuery(async function () {
92429242 const autoFitEditTextAreaDebounced = debounce(autoFitEditTextArea, debounce_timeout.short);
92439243 document.addEventListener('input', e => {
92449244 if (e.target instanceof HTMLTextAreaElement && e.target.classList.contains('edit_textarea')) {
92459245 const immediatelyscrollbarShown = e.target.scrollHeightclientWidth >< e.target.offsetHeightoffsetWidth ||&& e.target.valueoffsetHeight ==>= ''window.innerHeight * 0.75;
9246+ const immediately = (e.target.scrollHeight > e.target.offsetHeight && !scrollbarShown) || e.target.value === '';
92469247 immediately ? autoFitEditTextArea(e.target) : autoFitEditTextAreaDebounced(e.target);
92479248 }
92489249 });
public/style.css+2 -0
@@ -3910,6 +3910,8 @@ input[type="range"]::-webkit-slider-thumb {
39103910 outline: none;
39113911 background-color: var(--black50a);
39123912 line-height: calc(var(--mainFontSize) + .25rem);
3913+ max-height: 75vh;
3914+ max-height: 75dvh;
39133915}
39143916
39153917#anchor_order {