From d705c864ba69dc0eebe45aa628e714acc8b1b58c Mon Sep 17 00:00:00 2001 From: owi92 <94838646+owi92@users.noreply.github.com> Date: Fri, 18 Nov 2022 14:28:11 +0100 Subject: [PATCH] Limit formatting bar offset to top of composer (#9365) * Limit formatting bar offset to top of composer When highlighting larger sections in the composer, the formatting bar would scroll up and cover a previous post. This commit makes sure the bar's offset will be limited to the top of the composer. It should also make the code slightly more maintainable by getting the bar height from the DOMrect and basing the offset on that height instead of hardcoding it. Resolves: #12359 --- src/components/views/rooms/MessageComposerFormatBar.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/views/rooms/MessageComposerFormatBar.tsx b/src/components/views/rooms/MessageComposerFormatBar.tsx index 3258ce51afb..e8fa773edeb 100644 --- a/src/components/views/rooms/MessageComposerFormatBar.tsx +++ b/src/components/views/rooms/MessageComposerFormatBar.tsx @@ -66,8 +66,11 @@ export default class MessageComposerFormatBar extends React.PureComponent