1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 14:35:55 +00:00

Article.cdmScrollToId: disable smooth scrolling in collapsed combined mode

This commit is contained in:
Andrew Dolgov
2019-12-10 08:58:32 +03:00
parent 560346f9d1
commit a40f22d8aa

View File

@@ -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);