fix: safari chat regressions #264
Reference in New Issue
Block a user
Delete Branch "userAdityaa/flotilla:regression-safari"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Safari's
flex-col-reversechat streams don't support scroll anchoring, causing new messages to push the viewport up. We now manually pin the scroll position when already at bottom. Additionally, we fixed a stale cleanup function issue that prevented proper feed resubscription on room revisit, and enabled optimistic self-message visibility by allowing recent self-events without relay confirmation to appear immediately (limited to chat feeds only).closes #236
@@ -117,0 +123,4 @@(allowOptimisticSelfEvents &&event.pubkey === pubkey.get() &&tracker.getRelays(event.id).size === 0 &&event.created_at >= now() - 60)),This should be handled by welshman's thunk stuff (when a thunk is enqueued it optimistically tracks it at all target relays). Are you seeing new events not showing up immediately?
Not consistently. It’s an intermittent Safari timing issue, so new events can appear immediately most of the time, but occasionally show up late (especially right after send) until relay confirmation arrives.
This issue doesn’t occur in browsers like Chrome or Firefox, which I’ve also tested.
I finally had a chance to look into this more closely and I think the solution is simpler, a few months ago I added
content-visibility: autoto chat messages to improve rendering performance, but that is messing Safari up. I removed it inc6b0799band this all looks good now. Feel free to open another issue if there's still something wrong.Pull request closed