summaryrefslogtreecommitdiff
path: root/js/Article.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2019-12-10 08:58:32 +0300
committerAndrew Dolgov <[email protected]>2019-12-10 08:58:32 +0300
commita40f22d8aa0848456cd988b8523537bd1205f490 (patch)
tree816d168f1fc0a8796f5d2e377ff46eed800bbb5c /js/Article.js
parent560346f9d19f521db1adfbad2cab8c0c61e16cf7 (diff)
Article.cdmScrollToId: disable smooth scrolling in collapsed combined mode
Diffstat (limited to 'js/Article.js')
-rw-r--r--js/Article.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/js/Article.js b/js/Article.js
index 78ace5d0b..11e0305a7 100644
--- a/js/Article.js
+++ b/js/Article.js
@@ -278,13 +278,14 @@ define(["dojo/_base/declare"], function (declare) {
cdmScrollToId: function (id, force, event) {
const ctr = $("headlines-frame");
const e = $("RROW-" + id);
+ const is_expanded = App.getInitParam("cdm_expanded");
if (!e || !ctr) return;
- if (force || e.offsetTop + e.offsetHeight > (ctr.scrollTop + ctr.offsetHeight) ||
+ if (force || is_expanded || e.offsetTop + e.offsetHeight > (ctr.scrollTop + ctr.offsetHeight) ||
e.offsetTop < ctr.scrollTop) {
- if (event && event.repeat) {
+ if (event && event.repeat || !is_expanded) {
ctr.addClassName("forbid-smooth-scroll");
window.clearTimeout(this._scroll_reset_timeout);