Shifts focus to the document when collapsing a sidebar view
AcceptedPublic

Authored by mayankchoudhary on Jun 27 2019, 10:47 AM.

Details

Reviewers
aacid
sander
ngraham
Group Reviewers
Okular
Summary

If we click on a sidebar item to collapse it, the focus remains on the sidebar item list and pressing the up/down arrow, j, k or page up/down key doesn't scroll the document, instead iterates through the sidebar items. Applying this patch, the focus shifts to the document on collapsing the sidebar.
If the sidebar is collapsed when the document is not opened, the focus shifts away from it.

BUG: 213508
FIXED-IN: 1.8.0

Test Plan
  1. Open a PDF document
  2. The sidebar becomes active showing contents or thumbnails
  3. The user doesn't want to see them, so clicks on the sidebar active item to hide the contents/thumbnails pane
  4. To scroll the page, the user presses the up/down arrow, j, k or page up/down key
  5. The sidebar items iterates instead of scrolling of document
  6. Applying this patch, the document should be scrolled in step 4

Diff Detail

Repository
R223 Okular
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 13336
Build 13354: arc lint + arc unit
Restricted Application added a project: Okular. · View Herald TranscriptJun 27 2019, 10:47 AM
Restricted Application added a subscriber: okular-devel. · View Herald Transcript
mayankchoudhary requested review of this revision.Jun 27 2019, 10:47 AM
ngraham accepted this revision.Jun 28 2019, 3:50 PM
ngraham retitled this revision from Closing the sidebar shifts focus to the document/away from the sidebar. to Shifts focus to the document when collapsing a sidebar view.
ngraham edited the summary of this revision. (Show Details)
ngraham added reviewers: Okular, aacid, sander.
ngraham added a subscriber: ngraham.

Thanks, this has driven me crazy for years. Works fine and LGTM, though I'd like a review from @aacid or @sander or another Okular person first.

This revision is now accepted and ready to land.Jun 28 2019, 3:51 PM

@aacid May you please review this ?

Please before the merge commit, change my username to "Mayank Choudhary".

aacid added a comment.Jul 1 2019, 6:34 PM

can we get an autotest so we don't regress in the future?

Seems like it should be ultra hard?