Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 0343a33

Browse files
authored
Merge pull request #5745 from matrix-org/travis/fix-rr-maybe
Change read receipt drift to be non-fractional
2 parents 1c482e2 + 88a2bdb commit 0343a33

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/views/rooms/ReadReceiptMarker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,14 @@ export default class ReadReceiptMarker extends React.PureComponent {
156156
// then shift to the rightmost column,
157157
// and then it will drop down to its resting position
158158
//
159-
// XXX: We use a fractional left value to trick velocity-animate into actually animating.
159+
// XXX: We use a small left value to trick velocity-animate into actually animating.
160160
// This is a very annoying bug where if it thinks there's no change to `left` then it'll
161161
// skip applying it, thus making our read receipt at +14px instead of +0px like it
162162
// should be. This does cause a tiny amount of drift for read receipts, however with a
163163
// value so small it's not perceived by a user.
164164
// Note: Any smaller values (or trying to interchange units) might cause read receipts to
165165
// fail to fall down or cause gaps.
166-
startStyles.push({ top: startTopOffset+'px', left: '0.001px' });
166+
startStyles.push({ top: startTopOffset+'px', left: '1px' });
167167
enterTransitionOpts.push({
168168
duration: bounce ? Math.min(Math.log(Math.abs(startTopOffset)) * 200, 3000) : 300,
169169
easing: bounce ? 'easeOutBounce' : 'easeOutCubic',

0 commit comments

Comments
 (0)