Fix phone scrolling of logprobs

This commit is contained in:
Cohee 2024-07-15 01:18:54 +03:00
parent ecceeec62a
commit 558bbce919
1 changed files with 3 additions and 1 deletions

View File

@ -110,7 +110,9 @@ function renderAlternativeTokensView() {
// scroll past long prior context
if (prefix) {
view.find('.logprobs_output_token').first()[0].scrollIntoView();
const element = view.find('.logprobs_output_token').first();
const scrollOffset = element.offset().top - element.parent().offset().top;
element.parent().scrollTop(scrollOffset);
}
}