From 92c0c1a4e2c1a38bba1a92fe0d0ca1d85d76db36 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 6 Sep 2019 10:28:53 +0200 Subject: [PATCH] add comment about positioning the format bar --- src/components/views/rooms/BasicMessageComposer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/views/rooms/BasicMessageComposer.js b/src/components/views/rooms/BasicMessageComposer.js index 06d8013550..e0468e9969 100644 --- a/src/components/views/rooms/BasicMessageComposer.js +++ b/src/components/views/rooms/BasicMessageComposer.js @@ -274,6 +274,7 @@ export default class BasicMessageEditor extends React.Component { } this._formatBarRef.style.left = `${selectionRect.left - leftOffset}px`; + // 12 is half the height of the bar (e.g. to center it) and 16 is an offset that felt ok. this._formatBarRef.style.top = `${selectionRect.top - topOffset - 16 - 12}px`; } }