Skip to content

Commit e4ed680

Browse files
committed
スクロール調整時、まれにスクロール比率の算出で失敗する
1 parent dd4424a commit e4ed680

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

RemoteLogViewer.WinUI/Assets/Web/src/components/TextFileViewer.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,10 @@ const onVirtualScroll = (e: Event) => {
251251
252252
virtualScrollTimeout.value = setTimeout(() => {
253253
const scrollRatio = target.scrollTop / (target.scrollHeight - target.clientHeight);
254+
255+
if (isNaN(scrollRatio)) {
256+
return;
257+
}
254258
if (scrollRatio === 1) {
255259
jumpLine(totalLines.value);
256260
} else {

0 commit comments

Comments
 (0)