This repository was archived by the owner on Dec 6, 2025. It is now read-only.
fix(frontend): 스크롤 핸들러 강제이동 버그 수정#219
Merged
Merged
Conversation
selentia
approved these changes
Nov 27, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
채팅방에서 스크롤을 위로 올려도 계속 아래로 강제 이동되는 버그를 수정했습니다.
문제 상황
원인 분석
messages배열 참조 변경 시 불필요한 스크롤 트리거shouldScrollToBottom상태가 갱신되지 않음shouldScrollToBottom이true로 유지됨shouldScrollToBottom || isNearBottom조건에서 항상true가 되어 강제 스크롤 발생수정 내용
파일:
frontend/src/entities/chat/model/useUnreadMessageScroll.ts스크롤 트리거 조건 최적화
messages→messages.length로 변경사용자 스크롤 시 자동 스크롤 비활성화
handleScroll에서 사용자가 100px 이상 위로 스크롤하면shouldScrollToBottom = false설정Test plan