[web] Scrolling to the edited message when it overflows
Summary:
Currently, if the user wants to edit a message which overflows (near the top or bottom of the ChatMessageList), the edit box may also overflow.
This diff addresses that, if the message edit box may overflow, we first scroll so that the edited message is in the center, and then open the edit box.
Test Plan:
Run the app on Chrome, and checked:
- entered edit mode for a message which overflows, checked if the browser scrolled to it, and opened the edit box,
- entered edit mode for a message in the middle, checked if the edit box was opened instantly and without scrolling,
- added new lines for the edited message, and checked if it still fits in the container.
Videos:
Reviewers: michal, inka, ashoat
Reviewed By: inka, ashoat
Subscribers: kamil, ashoat, tomek, atul
Differential Revision: https://phab.comm.dev/D8027