I recently disabled the existing JS call because in use it was annoying - I can't remember what I didn't like, but it just didn't work well.
Maybe the first step would be to put the code back and test it out to see if it was just me !
|
//bool bottom = false; |
|
//try |
|
//{ |
|
// bottom = await JSRuntime.IsScrolledToBottom("blgmessagelist"); |
|
//} |
|
//catch |
|
//{ |
|
//} |
|
|
|
if (Messages?.Any() ?? false) |
|
{ |
|
options.AfterId = GetLastMessageId(); |
|
} |
|
await FetchNewMessages(options, tokenSource.Token); |
|
|
|
//if (Messages?.Any() ?? false) |
|
//{ |
|
// if (bottom) |
|
// { |
|
// _ = await JSRuntime.ScrollIntoView(GetLastMessageId()); |
|
// } |
|
//} |
I recently disabled the existing JS call because in use it was annoying - I can't remember what I didn't like, but it just didn't work well.
Maybe the first step would be to put the code back and test it out to see if it was just me !
Gitter/src/Blazor.Gitter.Core/Components/Shared/RoomMessages.razor.cs
Lines 176 to 197 in e78754f