summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-05-17 17:01:52 +0300
committerAndrew Dolgov <[email protected]>2020-05-17 17:01:52 +0300
commit25c84677534f9c97eca77498177aa5afb74142b2 (patch)
tree96f89f0e46fd9e7de716b03d3b0d8a91e2a2630e /js/Article.js
parent05a84ab778ee0bc5af3ee626ef87a2074d06c51a (diff)
rename Headlines.correctHeadlinesOffset() to scrollToArticleId()
invoke it in Article.view() instead of all over the place
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/js/Article.js b/js/Article.js
index 91b2b4b36..b0021f47b 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -139,7 +139,7 @@ define(["dojo/_base/declare"], function (declare) {
c.attr('content', article);
PluginHost.run(PluginHost.HOOK_ARTICLE_RENDERED, c.domNode);
- Headlines.correctHeadlinesOffset(Article.getActive());
+ //Headlines.correctHeadlinesOffset(Article.getActive());
try {
c.focus();
@@ -198,6 +198,7 @@ define(["dojo/_base/declare"], function (declare) {
},
view: function (id, noexpand) {
this.setActive(id);
+ Headlines.scrollToArticleId(id);
if (!noexpand) {
const hl = Headlines.objectById(id);