diff --git a/js/Feeds.js b/js/Feeds.js index fbcb56150..555f8f59f 100644 --- a/js/Feeds.js +++ b/js/Feeds.js @@ -303,11 +303,6 @@ define(["dojo/_base/declare"], function (declare) { // this is used to quickly switch between feeds, sets active but xhr is on a timeout const delayed = params.delayed || false; - if (feed != this.getActive() || this.activeIsCat() != is_cat) { - this._search_query = false; - Article.setActive(0); - } - if (offset != 0) { if (this.infscroll_in_progress) return; diff --git a/js/Headlines.js b/js/Headlines.js index 8895399b2..c16b070be 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -16,10 +16,12 @@ define(["dojo/_base/declare"], function (declare) { Article.openInNewWindow(id); } - Article.setActive(id); + if (Article.getActive() != id) { + Article.setActive(id); - if (!App.getInitParam("cdm_expanded")) - Article.cdmScrollToId(id); + if (!App.getInitParam("cdm_expanded")) + Article.cdmScrollToId(id); + } return in_body; @@ -231,6 +233,9 @@ define(["dojo/_base/declare"], function (declare) { if (reply) { + if (offset == 0) + Article.setActive(0); + is_cat = reply['headlines']['is_cat']; feed_id = reply['headlines']['id']; Feeds.last_search_query = reply['headlines']['search_query'];