Limit edit textarea height to 75%

0a0fc0141c5e7aa91b0c6386cdaf78efdb0fdd59

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

2 files changed, +4 -1Ignore whitespace
public/script.js+2 -1
@@ -9242,7 +9242,8 @@ jQuery(async function () {
9242 const autoFitEditTextAreaDebounced = debounce(autoFitEditTextArea, debounce_timeout.short);9242 const autoFitEditTextAreaDebounced = debounce(autoFitEditTextArea, debounce_timeout.short);
9243 document.addEventListener('input', e => {9243 document.addEventListener('input', e => {
9244 if (e.target instanceof HTMLTextAreaElement && e.target.classList.contains('edit_textarea')) {9244 if (e.target instanceof HTMLTextAreaElement && e.target.classList.contains('edit_textarea')) {
9245 const immediately = e.target.scrollHeight > e.target.offsetHeight || e.target.value === '';9245 const scrollbarShown = e.target.clientWidth < e.target.offsetWidth && e.target.offsetHeight >= window.innerHeight * 0.75;
9246 const immediately = (e.target.scrollHeight > e.target.offsetHeight && !scrollbarShown) || e.target.value === '';
9246 immediately ? autoFitEditTextArea(e.target) : autoFitEditTextAreaDebounced(e.target);9247 immediately ? autoFitEditTextArea(e.target) : autoFitEditTextAreaDebounced(e.target);
9247 }9248 }
9248 });9249 });
public/style.css+2 -0
@@ -3910,6 +3910,8 @@ input[type="range"]::-webkit-slider-thumb {
3910 outline: none;3910 outline: none;
3911 background-color: var(--black50a);3911 background-color: var(--black50a);
3912 line-height: calc(var(--mainFontSize) + .25rem);3912 line-height: calc(var(--mainFontSize) + .25rem);
3913 max-height: 75vh;
3914 max-height: 75dvh;
3913}3915}
39143916
3915#anchor_order {3917#anchor_order {