mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Unlock scrolling on streaming if scrolled with mouse wheel
This commit is contained in:
@ -291,6 +291,7 @@ let streamingProcessor = null;
|
|||||||
let crop_data = undefined;
|
let crop_data = undefined;
|
||||||
let is_delete_mode = false;
|
let is_delete_mode = false;
|
||||||
let fav_ch_checked = false;
|
let fav_ch_checked = false;
|
||||||
|
let scrollLock = false;
|
||||||
|
|
||||||
//initialize global var for future cropped blobs
|
//initialize global var for future cropped blobs
|
||||||
let currentCroppedAvatar = '';
|
let currentCroppedAvatar = '';
|
||||||
@ -1745,8 +1746,10 @@ class StreamingProcessor {
|
|||||||
this.setFirstSwipe(messageId);
|
this.setFirstSwipe(messageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!scrollLock) {
|
||||||
scrollChatToBottom();
|
scrollChatToBottom();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onFinishStreaming(messageId, text) {
|
onFinishStreaming(messageId, text) {
|
||||||
this.hideMessageButtons(this.messageId);
|
this.hideMessageButtons(this.messageId);
|
||||||
@ -1839,6 +1842,7 @@ class StreamingProcessor {
|
|||||||
if (this.messageId == -1) {
|
if (this.messageId == -1) {
|
||||||
this.messageId = this.onStartStreaming(this.firstMessageText);
|
this.messageId = this.onStartStreaming(this.firstMessageText);
|
||||||
await delay(1); // delay for message to be rendered
|
await delay(1); // delay for message to be rendered
|
||||||
|
scrollLock = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -6318,10 +6322,9 @@ $(document).ready(function () {
|
|||||||
updateVisibleDivs('#rm_print_characters_block', true);
|
updateVisibleDivs('#rm_print_characters_block', true);
|
||||||
}, 5));
|
}, 5));
|
||||||
|
|
||||||
// This does not actually increase performance.
|
$("#chat").on('mousewheel', () => {
|
||||||
/*$("#chat").on('scroll', debounce(() => {
|
scrollLock = true;
|
||||||
updateVisibleDivs('#chat', false);
|
});
|
||||||
}, 10));*/
|
|
||||||
|
|
||||||
let S_TAFocused = false;
|
let S_TAFocused = false;
|
||||||
let S_TAPreviouslyFocused = false;
|
let S_TAPreviouslyFocused = false;
|
||||||
|
Reference in New Issue
Block a user