Using Hotkeys does not move the article to the top

Support requests, bug reports, etc. go here. Dedicated servers / VDS hosting only
GoodSoul
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 17 Apr 2013, 12:54

Using Hotkeys does not move the article to the top

Postby GoodSoul » 17 Apr 2013, 13:05

Hi,

I often have the problem that by using hotkeys the article will not move to the top (see screenshot). It doesn't matter if I disable/enable swap_jk and/or googlereaderkeys. So I guess that it is not a plugin problem. If you need any further information let me know, I will support you as good as I can.

Thanks for TT-RSS. It is really awesome and I love it! :)

Image source: miscpix.com/2qp3g

Image

dang
Bear Rating Trainee
Bear Rating Trainee
Posts: 14
Joined: 19 Mar 2013, 22:06

Re: Using Hotkeys does not move the article to the top

Postby dang » 17 Apr 2013, 17:52


GoodSoul
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 17 Apr 2013, 12:54

Re: Using Hotkeys does not move the article to the top

Postby GoodSoul » 17 Apr 2013, 21:13

Dang, thanks for the reply. My bug description is for the keys "j/k" not for "n/p". ;)
It happends after a couple of articles while using j/k keys. I can fix that display problem by pressing k and j again. Then I see the same article again but mostly on top.

Sorry, my english is not the best but I hope you can figure out what I mean. :)

jasminebanks
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 28 Mar 2013, 01:11

Re: Using Hotkeys does not move the article to the top

Postby jasminebanks » 17 Apr 2013, 22:25

I had this same issue. For the moment, I hacked js/viewfeed.js moveToPost function with the following line (add as first line of the function):

Code: Select all

noscroll = (noscroll) ? noscroll : true;


Basically, I noticed noscroll was coming in undefined, so I hacked the code to default to true.

This fix should work whether you're using n/p or j/k key combinations.

dang
Bear Rating Trainee
Bear Rating Trainee
Posts: 14
Joined: 19 Mar 2013, 22:06

Re: Using Hotkeys does not move the article to the top

Postby dang » 17 Apr 2013, 23:34

Only by making n/p work like j/k all the time. If undefined is the issue (I haven't seen this issue, so I can't say), a better solution is to always pass false for unpassed parameters in calls to moveToPost() in js/tt-rss.js:

Code: Select all

diff --git a/js/tt-rss.js b/js/tt-rss.js
index fe12297..9d948ca 100644
--- a/js/tt-rss.js
+++ b/js/tt-rss.js
@@ -275,16 +275,16 @@ function init() {
                                if (rv) viewfeed(rv[0], '', rv[1]);
                };
                hotkey_actions["next_article"] = function() {
-                               moveToPost('next');
+                               moveToPost('next', false, false);
                };
                hotkey_actions["prev_article"] = function() {
-                               moveToPost('prev');
+                               moveToPost('prev', false, false);
                };
                hotkey_actions["next_article_noscroll"] = function() {
-                               moveToPost('next', true);
+                               moveToPost('next', true, false);
                };
                hotkey_actions["prev_article_noscroll"] = function() {
-                               moveToPost('prev', true);
+                               moveToPost('prev', true, false);
                };
                hotkey_actions["next_article_noexpand"] = function() {
                                moveToPost('next', true, true);


jasminebanks
Bear Rating Trainee
Bear Rating Trainee
Posts: 10
Joined: 28 Mar 2013, 01:11

Re: Using Hotkeys does not move the article to the top

Postby jasminebanks » 18 Apr 2013, 00:05

Hi Dang,

Thanks. I hadn't extensively analyzed the code and knew my fix was just a hack.
:)

GoodSoul
Bear Rating Trainee
Bear Rating Trainee
Posts: 12
Joined: 17 Apr 2013, 12:54

Re: Using Hotkeys does not move the article to the top

Postby GoodSoul » 20 Apr 2013, 02:24

Thanks dang. It seems to work now after I changed the tt-rss.js.


Return to “Support”

Who is online

Users browsing this forum: Google [Bot] and 16 guests