From 0578bf802571781a0a7e3debbbec66437a7d28b4 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 13 Apr 2023 20:15:23 +0300 Subject: add Headlines.default_move_on_expand tunable --- js/Headlines.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/Headlines.js b/js/Headlines.js index be17bf832..5706377f8 100755 --- a/js/Headlines.js +++ b/js/Headlines.js @@ -13,6 +13,7 @@ const Headlines = { _scroll_reset_timeout: false, default_force_previous: false, default_force_to_top: false, + default_move_on_expand: true, line_scroll_offset: 120, /* px */ sticky_header_observer: new IntersectionObserver( (entries, observer) => { @@ -255,7 +256,8 @@ const Headlines = { // this would only work if there's enough space App.byId("headlines-frame").scrollTop -= scroll_position_A-scroll_position_B; - Article.cdmMoveToId(id); + if (this.default_move_on_expand) + Article.cdmMoveToId(id); } } else if (in_body) { -- cgit v1.2.3