summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2020-04-17 07:58:34 +0300
committerAndrew Dolgov <[email protected]>2020-04-17 07:58:34 +0300
commite17c7e2fb432f572bcfd2a3ae173f36dd08e1cac (patch)
tree0fbe4df650ed563a9ef26b451e46d6a1c0a6f3fc /js/Article.js
parentb3e4f0188e68ee7f61121b247d7202fb68d9c28e (diff)
Headlines.renderAgain: scroll instantly to active article when going back to combined mode on the fly
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/Article.js b/js/Article.js
index ae390331f..9c170598a 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -289,7 +289,7 @@ define(["dojo/_base/declare"], function (declare) {
dialog.show();
},
- cdmScrollToId: function (id, force, event) {
+ cdmScrollToId: function (id, force, event, immediate) {
const ctr = $("headlines-frame");
const e = $("RROW-" + id);
const is_expanded = App.getInitParam("cdm_expanded");
@@ -299,7 +299,7 @@ define(["dojo/_base/declare"], function (declare) {
if (force || is_expanded || e.offsetTop + e.offsetHeight > (ctr.scrollTop + ctr.offsetHeight) ||
e.offsetTop < ctr.scrollTop) {
- if (event && event.repeat || !is_expanded) {
+ if (immediate || event && event.repeat || !is_expanded) {
ctr.addClassName("forbid-smooth-scroll");
window.clearTimeout(this._scroll_reset_timeout);