Skip to content

Commit

Permalink
better solution for PM scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffputz committed Aug 29, 2022
1 parent 37fb5bb commit 2e6da97
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/PopForums.Web/wwwroot/lib/PopForums/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@popworldmedia/popforums",
"version": "19.0.0-prerelease.354",
"version": "19.0.0-prerelease.355",
"description": "POP Forums client side",
"scripts": {},
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class PrivateMessageState extends StateBase {
let isBottom = parent.scrollHeight - parent.scrollTop - parent.clientHeight < 200;
self.postStream.append(messageRow);
if (isBottom)
(self.postStream.lastChild as HTMLElement).scrollIntoView({ behavior: "smooth", block: "end", inline: "start" });
parent.scrollTop = parent.scrollHeight;
self.ackRead();
});
this.connection.onreconnected(async () => {
Expand Down

0 comments on commit 2e6da97

Please sign in to comment.