diff --git a/app/assets/javascripts/discourse/app/components/scroll-tracker.js b/app/assets/javascripts/discourse/app/components/scroll-tracker.js deleted file mode 100644 index 317f61b0864..00000000000 --- a/app/assets/javascripts/discourse/app/components/scroll-tracker.js +++ /dev/null @@ -1,40 +0,0 @@ -import Component from "@ember/component"; -import { next } from "@ember/runloop"; -import $ from "jquery"; -import Scrolling from "discourse/mixins/scrolling"; - -export default class ScrollTracker extends Component.extend(Scrolling) { - didReceiveAttrs() { - super.didReceiveAttrs(...arguments); - - this.set("trackerName", `scroll-tracker-${this.name}`); - } - - didInsertElement() { - super.didInsertElement(...arguments); - - this.bindScrolling(); - } - - didRender() { - super.didRender(...arguments); - - const data = this.session.get(this.trackerName); - if (data && data.position >= 0 && data.tag === this.tag) { - next(() => $(window).scrollTop(data.position + 1)); - } - } - - willDestroyElement() { - super.willDestroyElement(...arguments); - - this.unbindScrolling(); - } - - scrolled() { - this.session.set(this.trackerName, { - position: $(window).scrollTop(), - tag: this.tag, - }); - } -} diff --git a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs index 23df58a75f3..1d535097693 100644 --- a/app/assets/javascripts/discourse/app/templates/full-page-search.hbs +++ b/app/assets/javascripts/discourse/app/templates/full-page-search.hbs @@ -5,12 +5,6 @@ {{body-class "search-page"}}
-