diff --git a/app/assets/javascripts/discourse/app/mixins/scroll-top.js b/app/assets/javascripts/discourse/app/mixins/scroll-top.js deleted file mode 100644 index e8920c824f3..00000000000 --- a/app/assets/javascripts/discourse/app/mixins/scroll-top.js +++ /dev/null @@ -1,21 +0,0 @@ -import { scheduleOnce } from "@ember/runloop"; -import { isTesting } from "discourse/lib/environment"; -import DiscourseURL from "discourse/lib/url"; - -const context = { - _scrollTop() { - if (isTesting()) { - return; - } - document.documentElement.scrollTop = 0; - }, -}; - -function scrollTop() { - if (DiscourseURL.isJumpScheduled()) { - return; - } - scheduleOnce("afterRender", context, context._scrollTop); -} - -export { scrollTop };