clarify scroll method name

This commit is contained in:
sbwalker 2023-05-26 07:41:49 -04:00
parent 4ad5522f9e
commit 6f0a6c7f69
3 changed files with 4 additions and 8 deletions

View File

@ -624,8 +624,7 @@
else else
{ {
AddModuleMessage(Localizer["Success.Settings.SaveSite"], MessageType.Success); AddModuleMessage(Localizer["Success.Settings.SaveSite"], MessageType.Success);
// scroll to top of page so user can see messages await ScrollToPageTop();
await ScrollToTop();
} }
} }
} }
@ -694,9 +693,7 @@
await NotificationService.AddNotificationAsync(new Notification(PageState.Site.SiteId, PageState.User, PageState.Site.Name + " SMTP Configuration Test", "SMTP Server Is Configured Correctly.")); await NotificationService.AddNotificationAsync(new Notification(PageState.Site.SiteId, PageState.User, PageState.Site.Name + " SMTP Configuration Test", "SMTP Server Is Configured Correctly."));
AddModuleMessage(Localizer["Info.Smtp.SaveSettings"], MessageType.Info); AddModuleMessage(Localizer["Info.Smtp.SaveSettings"], MessageType.Info);
await ScrollToPageTop();
// scroll to top of page so user can see messages
await ScrollToTop();
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -372,8 +372,7 @@ else
AddModuleMessage(Localizer["Message.Required.ProfileInfo"], MessageType.Warning); AddModuleMessage(Localizer["Message.Required.ProfileInfo"], MessageType.Warning);
} }
// scroll to top of page so user can see messages await ScrollToPageTop();
await ScrollToTop();
} }
catch (Exception ex) catch (Exception ex)
{ {

View File

@ -291,7 +291,7 @@ namespace Oqtane.Modules
} }
} }
public async Task ScrollToTop() public async Task ScrollToPageTop()
{ {
var interop = new Interop(JSRuntime); var interop = new Interop(JSRuntime);
await interop.ScrollTo(0, 0, "smooth"); await interop.ScrollTo(0, 0, "smooth");