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

Headlines.renderAgain: scroll instantly to active article when going back to combined mode on the fly

This commit is contained in:
Andrew Dolgov
2020-04-17 07:58:34 +03:00
parent b3e4f0188e
commit e17c7e2fb4
2 changed files with 19 additions and 17 deletions

View File

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