After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 726485 - Documents cannot be navigated with keyboard unless the document is clicked.
Documents cannot be navigated with keyboard unless the document is clicked.
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.11.x
Other All
: Normal enhancement
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
ready
: 736977 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2014-03-17 01:54 UTC by Paul Martin
Modified: 2014-09-19 15:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
PreviewView keyboard handling (963 bytes, patch)
2014-03-17 02:01 UTC, Paul Martin
needs-work Details | Review
mainWindow: Handle the back key before everything else (1.35 KB, patch)
2014-07-15 10:00 UTC, Debarshi Ray
committed Details | Review
Fix keyboard navigation in preview mode (7.86 KB, patch)
2014-07-15 10:00 UTC, Debarshi Ray
committed Details | Review

Description Paul Martin 2014-03-17 01:54:06 UTC
Steps to reproduce:
- open a multi-page document from any source
- without clicking on anything, click the right and left arrows 

Nothing will happen.

In order to make navigation with arrows work, one must click on the screen of the document.

one should be able to navigate the document by using the arrow keys from the moment that the document becomes active.
Comment 1 Paul Martin 2014-03-17 02:01:29 UTC
Created attachment 272102 [details] [review]
PreviewView keyboard handling

This fixes the bug.
Comment 2 Allan Day 2014-03-29 16:17:34 UTC
Seems like a good thing to have.
Comment 3 Debarshi Ray 2014-07-11 08:58:24 UTC
What about page up or page down?
Comment 4 Debarshi Ray 2014-07-11 09:28:48 UTC
(In reply to comment #3)
> What about page up or page down?

Ignore me. I should have read the code first.
Comment 5 Debarshi Ray 2014-07-11 14:25:39 UTC
Review of attachment 272102 [details] [review]:

Thanks for the patch, Paul. One problem with this is that when you are searching in the preview, the left and right keys change the pages instead of moving the cursor in the search bar.

::: src/mainWindow.js
@@ +235,3 @@
                 Application.documentManager.setActiveItem(null);
         }
+        return this._embed.getPreview()._onKeyPressEvent(this,event);

We should probably move the whole of _onKeyPressEvent here to consolidate all the keyboard navigation logic in one place.
Comment 6 Debarshi Ray 2014-07-15 10:00:05 UTC
Created attachment 280694 [details] [review]
mainWindow: Handle the back key before everything else
Comment 7 Debarshi Ray 2014-07-15 10:00:36 UTC
Created attachment 280695 [details] [review]
Fix keyboard navigation in preview mode
Comment 8 Cosimo Cecchi 2014-07-30 12:36:09 UTC
Review of attachment 280694 [details] [review]:

OK
Comment 9 Cosimo Cecchi 2014-07-30 12:41:11 UTC
Review of attachment 280695 [details] [review]:

If you have tested this to work fine, looks good to me.
Comment 10 Debarshi Ray 2014-07-30 12:44:01 UTC
Thanks for the review, Cosimo.
Comment 11 Debarshi Ray 2014-09-19 15:32:19 UTC
*** Bug 736977 has been marked as a duplicate of this bug. ***