foliate icon indicating copy to clipboard operation
foliate copied to clipboard

Touchpad gestures do not work, PageUp/PageDown and left/right keys stopped working "suddenly".

Open mars4science opened this issue 3 years ago • 9 comments

Describe the bug Hi! Today suddenly PageUp/PageDown and left/right keys stopped working, also after than I've checked touchpad gestures do not work either. As I've opened "Keyboard shortcuts" I saw N and P are keys to navigate pages (they work. but :eft/Right keys are more convenient and they worked AFAIK every time before). I have book(s) open I hope I will be able to keep it open for several days to investigate, please guide me.

To Reproduce Don't know.

Expected behavior Touchpad gestures and PageUp/PageDown and Left/Right keys flip pages.

Screenshots If applicable, add screenshots to help explain your problem.

Version:

  • Foliate version: 2.6.4
  • OS/Distribution and version: Linux Mint 20.2
  • Desktop environment: [e.g. GNOME 3.36]
  • Installation method: apt deb IIRC

Additional context Foliate IIRC been open for several day (I read one book after the other), Linux was suspended back and forth several times on current boot. In firefox scrolling via double-finger gesture works. In Foliate page flip via click on side of the page works (swipes do not).

mars4science avatar Jul 31 '22 15:07 mars4science

@mars4science I'm sorry I don't have a helpful advice. But your reported issue sounds a lot like the one reported some time ago. Can you please confirm if bug https://github.com/johnfactotum/foliate/issues/879 describes the issue you're facing?

tomicakorac avatar Jul 31 '22 19:07 tomicakorac

@tomicakorac, thanks for the reply. I've read bug at the link, understood app completely not usable there, my case is only some controls (and also I notice some large files takes ages to load - but that is still another issue). Not same.

mars4science avatar Aug 01 '22 04:08 mars4science

Have you tried using the page slider? Does the page slider work for you?

As for the files taking ages to load, are you sure the loading time depends on the file size? There is also another bug reported about Foliate not loading files until the focus changes to another application, and back to Foliate again. Can you double check if that is actually the issue you are experiencing?

tomicakorac avatar Aug 01 '22 04:08 tomicakorac

@tomicakorac, thank you. Slider works, N/P keys work, seems only swipes do not and PageUp/PageDown and left/right keys not. I guess for those there is some separate interface input. I've reloaded Foliate but still same issue. I prefer not to restart workstation, I'd like to consider even desktop Ubuntu/Mint stable. It is not critical, only I like Foliate (it has most options I like which other viewers do not) and want it be better.

Loading takes long: longer file (7k pages) loaded quickly whereas 2.5k pages one takes ages to load and to jump using slider. I've tried switching to another app and back - same loading animation, after using slider I see empty page for very long. I've opened the file causing issues with "E-book reader" named app (IIRC from Calibre package) - took several seconds to load (long, but not ages). I've just switched to Foliate and the page was on screen (finally), when I maximized the window I see blank screen again (for longer then several seconds, maybe minutes). Seems that particular file is difficult to layout? (not sure of correct term).

mars4science avatar Aug 04 '22 16:08 mars4science

@tomicakorac, hi again. I noted extra navigation (left key, swipes) started to work again. From the moment it had not I proceeded with actions described in my previous comment. W/out knowing the code my hypothesis is that extra navigation is separate thread monitoring inputs and it got stuck and unstuck from opening file that took ages to load. So both issues might be somehow connected. Thought I don't recall when the issue with navigation started.

mars4science avatar Aug 05 '22 06:08 mars4science

Thanks @mars4science. I wish I could help further, but your issue indeed does sound like a different one compared to what I and many others have.

tomicakorac avatar Aug 05 '22 11:08 tomicakorac

Arrow and page keys only work when the web view is focused. So when the keys don't work, it is possible that you just need to click on the page for them to work again. N and P, on the other hand, are shortcuts at the application level. See #523 and #308. (Those issues are closed but it's still a bug, and I will revisit the issue in the future. I think now the correct way of setting shortcuts in GTK is with EventControllers.)

But touchpad gestures not working is strange. One can rule out the problem of focus in this case, and since the N/P keys are working, there's nothing wrong on the web view side, either. So either the GestureSwipe is not working for some reason, or I guess one possibility is that if you've accidentally pinch zoomed a little, it would prevent the gestures from turning the page.

johnfactotum avatar Aug 11 '22 10:08 johnfactotum

@johnfactotum, what does it mean "the web view is focused"? No web view in setting, could not find by googling. I've tried to have scroll bar beneath visible or not - both ways left-right keys worked.

I recall both issues were at same period of time for two opened documents. I doubt I pitch-zoomed second book right after opening. Just checked second one is open w/out zoom even when 1st zoomed.

mars4science avatar Aug 18 '22 16:08 mars4science

The webview is the area where the page of the book is displayed. Shortcuts like arrows, page up page downs, hjkl, etc., are handled within the web page. Usually this is not an issue, as even if you click outside the webview, most of the time the widgets do not steal focus on click. When the focus is outside the webview, one can refocus it by clicking anywhere in on the page.

Gestures are handled completely differently. It's in GTK, set up on (rather than inside) the webview. So it is strange that they should be broken at the same time while N/P and buttons are working.

If I have to guess, might be that for whatever reason, the webview is not responding to events at all. For example, does it work if you click on links or select texts in the book? Or for example, switch to scrolled view and see if touchpad scrolling works in the webview. If these do not work either, then it's probably a WebKitGTK bug.

johnfactotum avatar Sep 09 '22 10:09 johnfactotum

The handling of shortcuts and gestures has been reworked in the GTK 4 version. Feel free to open a new issue if there are still similar problems in the new version.

johnfactotum avatar Nov 02 '23 05:11 johnfactotum