Bug 438827

Summary: When switching to Auto Fit zoom mode, the scrollbar sometimes disappears and then the viewport is locked at the top.
Product: [Applications] okular Reporter: Laura David Hurka <laura.stern>
Component: generalAssignee: Okular developers <okular-devel>
Status: CONFIRMED ---    
Severity: normal CC: aacid, acrylint
Priority: NOR    
Version First Reported In: 21.04.2   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Screencast: Scrolling impossible after switching to Auto Fit

Description Laura David Hurka 2021-06-17 20:37:33 UTC
Created attachment 139447 [details]
Screencast: Scrolling impossible after switching to Auto Fit

SUMMARY
This seems a bit like a way to reproduce https://bugs.kde.org/show_bug.cgi?id=421399, but also seems different. I can reproduce it often, with different documents, with one or two Okular windows, with and without Continuous mode. 

The only thing that seems related is the viewport aspect ratio compared to the page aspect ratio.

Maybe this is related to the fix for Bug 160628 (Constant resizing loop).

I didn’t observe this before, but AFAIR I didn’t explicitely switch to Auto Fit ever before. I use it only as default zoom mode to open new documents.

STEPS TO REPRODUCE
1. Open a document.
2. Zoom in, so vertical and horizontal scrollbars appear.
3. Switch to Auto Fit

OBSERVED RESULT
Vertical scrollbar gets space reserved, but is not shown. Scrolling is not possible in any way anymore. The issue disappears immediately when the viewport size is changed.

EXPECTED RESULT
Vertical scrollbar is shown as necessary.

SOFTWARE/OS VERSIONS
Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.1
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.3
Comment 1 Albert Astals Cid 2021-06-17 21:00:21 UTC
Using a very small window to reproduce helps (for my future self or anyone else, I'm using a 1 page document)