Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #1979/Auto scroll to latest message #2098

Conversation

Titonatos
Copy link
Contributor

@Titonatos Titonatos commented Feb 23, 2025

Task

Bug #1992 : Отсутствует автоматическая прокрутка к последнему сообщению в чате

Changes

  • Добавил обработчик скролла чата. При каждом скролле сохраняем высоту скролла, чтобы от него отталкиваться.
  • Добавил кнопку скролла чата к последнему сообщению. Кнопка появляется при появлении нового сообщения, если был минимальный скролл. Исчезает, как доходит до значений минимального скролла.
  • Поправил алгоритм useLayoutEffect исходя из обновлений.

image

@ReDBrother

@vtm9
Copy link
Contributor

vtm9 commented Feb 25, 2025

Let’s wait for @ReDBrother ’s approval.

@vtm9 vtm9 merged commit ca9d421 into hexlet-codebattle:master Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants