mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-22 06:57:41 +01:00
Limit edit textarea height to 75%
This commit is contained in:
parent
63ddb81ef7
commit
0a0fc0141c
@ -9242,7 +9242,8 @@ jQuery(async function () {
|
||||
const autoFitEditTextAreaDebounced = debounce(autoFitEditTextArea, debounce_timeout.short);
|
||||
document.addEventListener('input', e => {
|
||||
if (e.target instanceof HTMLTextAreaElement && e.target.classList.contains('edit_textarea')) {
|
||||
const immediately = e.target.scrollHeight > e.target.offsetHeight || e.target.value === '';
|
||||
const scrollbarShown = e.target.clientWidth < e.target.offsetWidth && e.target.offsetHeight >= window.innerHeight * 0.75;
|
||||
const immediately = (e.target.scrollHeight > e.target.offsetHeight && !scrollbarShown) || e.target.value === '';
|
||||
immediately ? autoFitEditTextArea(e.target) : autoFitEditTextAreaDebounced(e.target);
|
||||
}
|
||||
});
|
||||
|
@ -3910,6 +3910,8 @@ input[type="range"]::-webkit-slider-thumb {
|
||||
outline: none;
|
||||
background-color: var(--black50a);
|
||||
line-height: calc(var(--mainFontSize) + .25rem);
|
||||
max-height: 75vh;
|
||||
max-height: 75dvh;
|
||||
}
|
||||
|
||||
#anchor_order {
|
||||
|
Loading…
x
Reference in New Issue
Block a user