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

Fix jumping to read marker for events without tiles #4860

Merged
merged 1 commit into from
Jun 30, 2020

Conversation

jryans
Copy link
Collaborator

@jryans jryans commented Jun 30, 2020

It is possible for your read marker to be set to an event without a tile (like a
reaction). We would still render the read marker at the position of those events
in the timeline, even though there's no matching tile, which breaks a core
assumption of jump to read marker path: it assumes that if the read marker node
is present in the DOM, then there must also be an event tile with a scroll token
matching the event ID.

This fixes the situation by setting a scroll token on the read marker so it can
always be scrolled to, no matter what kind of event it might represent.

Fixes element-hq/element-web#10975

It is possible for your read marker to be set to an event without a tile (like a
reaction). We would still render the read marker at the position of those events
in the timeline, even though there's no matching tile, which breaks a core
assumption of jump to read marker path: it assumes that if the read marker node
is present in the DOM, then there must also be an event tile with a scroll token
matching the event ID.

This fixes the situation by setting a scroll token on the read marker so it can
always be scrolled to, no matter what kind of event it might represent.

Fixes element-hq/element-web#10975
@jryans jryans merged commit b456529 into develop Jun 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clicking Jump to first unread message button does nothing
2 participants