mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 18:35:57 +00:00
rename cdmScrollToId to cdmMoveToId
prevent smooth scrolling when going directly to an article
This commit is contained in:
@@ -290,7 +290,11 @@ define(["dojo/_base/declare"], function (declare) {
|
||||
|
||||
dialog.show();
|
||||
},
|
||||
cdmScrollToId: function (id, force, event, immediate) {
|
||||
cdmMoveToId: function (id, params) {
|
||||
const force = params.force || true;
|
||||
const event = params.event || null;
|
||||
const noscroll = params.noscroll || false;
|
||||
|
||||
const ctr = $("headlines-frame");
|
||||
const e = $("RROW-" + id);
|
||||
const is_expanded = App.getInitParam("cdm_expanded");
|
||||
@@ -300,7 +304,7 @@ define(["dojo/_base/declare"], function (declare) {
|
||||
if (force || is_expanded || e.offsetTop + e.offsetHeight > (ctr.scrollTop + ctr.offsetHeight) ||
|
||||
e.offsetTop < ctr.scrollTop) {
|
||||
|
||||
if (immediate || event && event.repeat || !is_expanded) {
|
||||
if (noscroll || event && event.repeat || !is_expanded) {
|
||||
ctr.addClassName("forbid-smooth-scroll");
|
||||
window.clearTimeout(this._scroll_reset_timeout);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user