Merge pull request #2846 from sbwalker/dev

clarify scroll method name
This commit is contained in:
Shaun Walker 2023-05-26 07:41:59 -04:00 committed by GitHub
commit d5e51d6c38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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");