From e7dd634183154949fab7aa0b00844eb645cb87e5 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 9 Dec 2019 22:42:43 +0300 Subject: exp: auto-disable smooth scrolling for repeat hotkey events --- js/tt-rss.js | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'js/tt-rss.js') diff --git a/js/tt-rss.js b/js/tt-rss.js index f5444207d..8972543c9 100644 --- a/js/tt-rss.js +++ b/js/tt-rss.js @@ -213,7 +213,7 @@ require(["dojo/_base/kernel", const action_func = this.hotkey_actions[action_name]; if (action_func != null) { - action_func(); + action_func(event); event.stopPropagation(); return false; } @@ -324,23 +324,23 @@ require(["dojo/_base/kernel", this.hotkey_actions["catchup_above"] = function () { Headlines.catchupRelativeTo(0); }; - this.hotkey_actions["article_scroll_down"] = function () { - Article.scroll(40); + this.hotkey_actions["article_scroll_down"] = function (event) { + Article.scroll(80, event); }; - this.hotkey_actions["article_scroll_up"] = function () { - Article.scroll(-40); + this.hotkey_actions["article_scroll_up"] = function (event) { + Article.scroll(-80, event); }; - this.hotkey_actions["next_article_page"] = function () { - Headlines.scrollByPages(1); + this.hotkey_actions["next_article_page"] = function (event) { + Headlines.scrollByPages(1, event); }; - this.hotkey_actions["prev_article_page"] = function () { - Headlines.scrollByPages(-1); + this.hotkey_actions["prev_article_page"] = function (event) { + Headlines.scrollByPages(-1, event); }; - this.hotkey_actions["article_page_down"] = function () { - Article.scrollByPages(1); + this.hotkey_actions["article_page_down"] = function (event) { + Article.scrollByPages(1, event); }; - this.hotkey_actions["article_page_up"] = function () { - Article.scrollByPages(-1); + this.hotkey_actions["article_page_up"] = function (event) { + Article.scrollByPages(-1, event); }; this.hotkey_actions["close_article"] = function () { if (App.isCombinedMode()) { -- cgit v1.2.3