mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-11 00:46:38 +01:00
Don't auto-adjust scroll height if not in viewport
This commit is contained in:
parent
5e44403346
commit
d75b30d51a
@ -712,6 +712,10 @@ function onChatChanged() {
|
||||
}
|
||||
|
||||
function adjustElementScrollHeight(){
|
||||
if (!$('.sd_settings').is(':visible')) {
|
||||
return;
|
||||
}
|
||||
|
||||
resetScrollHeight($('#sd_prompt_prefix'));
|
||||
resetScrollHeight($('#sd_negative_prompt'));
|
||||
resetScrollHeight($('#sd_character_prompt'));
|
||||
|
@ -292,6 +292,9 @@ export function throttle(func, limit = 300) {
|
||||
* @returns {boolean} True if the element is in the viewport, false otherwise.
|
||||
*/
|
||||
export function isElementInViewport(el) {
|
||||
if (!el) {
|
||||
return false;
|
||||
}
|
||||
if (typeof jQuery === 'function' && el instanceof jQuery) {
|
||||
el = el[0];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user