mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2026-01-10 12:09:15 +00:00
pgup/pgdown hotkey normalization:
- pgup/pgdown without modifier scroll headline buffer - shift+pgup/pgdown work similarly to shift+up/down but operating on pages
This commit is contained in:
@@ -314,7 +314,7 @@ define(["dojo/_base/declare"], function (declare) {
|
||||
else
|
||||
return 0;
|
||||
},
|
||||
scrollPages: function (offset) {
|
||||
scrollByPages: function (offset) {
|
||||
if (!App.isCombinedMode()) {
|
||||
const ci = $("content-insert");
|
||||
if (ci) {
|
||||
|
||||
@@ -1381,6 +1381,12 @@ define(["dojo/_base/declare"], function (declare) {
|
||||
|
||||
}
|
||||
},
|
||||
scrollByPages: function (offset) {
|
||||
const hi = $("headlines-frame");
|
||||
if (hi) {
|
||||
hi.scrollTop += hi.offsetHeight * offset * 0.9;
|
||||
}
|
||||
},
|
||||
initHeadlinesMenu: function () {
|
||||
if (!dijit.byId("headlinesMenu")) {
|
||||
|
||||
|
||||
10
js/tt-rss.js
10
js/tt-rss.js
@@ -330,11 +330,17 @@ require(["dojo/_base/kernel",
|
||||
this.hotkey_actions["article_scroll_up"] = function () {
|
||||
Article.scroll(-40);
|
||||
};
|
||||
this.hotkey_actions["next_article_page"] = function () {
|
||||
Headlines.scrollByPages(1);
|
||||
};
|
||||
this.hotkey_actions["prev_article_page"] = function () {
|
||||
Headlines.scrollByPages(-1);
|
||||
};
|
||||
this.hotkey_actions["article_page_down"] = function () {
|
||||
Article.scrollPages(1);
|
||||
Article.scrollByPages(1);
|
||||
};
|
||||
this.hotkey_actions["article_page_up"] = function () {
|
||||
Article.scrollPages(-1);
|
||||
Article.scrollByPages(-1);
|
||||
};
|
||||
this.hotkey_actions["close_article"] = function () {
|
||||
if (App.isCombinedMode()) {
|
||||
|
||||
Reference in New Issue
Block a user