Skip to content

Commit c912620

Browse files
committed
one
1 parent ca25cc4 commit c912620

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

elements/clean-one/clean-one.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,9 +925,13 @@ class CleanOne extends PrintBranchMixin(
925925
}
926926
// only way to hit this
927927
document.body.style.overflow = "hidden";
928+
this.HAXCMSThemeSettings.scrollTarget =
929+
this.shadowRoot.querySelector("main");
930+
globalThis.AbsolutePositionStateManager.requestAvailability().scrollTarget =
931+
this.HAXCMSThemeSettings.scrollTarget;
928932
// hook up the scroll target
929933
this.shadowRoot.querySelector("scroll-button").target =
930-
this.shadowRoot.querySelector("#haxcms-theme-top");
934+
this.shadowRoot.querySelector("main");
931935

932936
const params = new URLSearchParams(store.currentRouterLocation.search);
933937
// if we have a search param already, set it to the field on open

elements/clean-one/src/clean-one.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,9 +925,13 @@ class CleanOne extends PrintBranchMixin(
925925
}
926926
// only way to hit this
927927
document.body.style.overflow = "hidden";
928+
this.HAXCMSThemeSettings.scrollTarget =
929+
this.shadowRoot.querySelector("main");
930+
globalThis.AbsolutePositionStateManager.requestAvailability().scrollTarget =
931+
this.HAXCMSThemeSettings.scrollTarget;
928932
// hook up the scroll target
929933
this.shadowRoot.querySelector("scroll-button").target =
930-
this.shadowRoot.querySelector("#haxcms-theme-top");
934+
this.shadowRoot.querySelector("main");
931935

932936
const params = new URLSearchParams(store.currentRouterLocation.search);
933937
// if we have a search param already, set it to the field on open

0 commit comments

Comments
 (0)