kchmviewer icon indicating copy to clipboard operation
kchmviewer copied to clipboard

No scrollbar on content unless I disable Javascript

Open ojwb opened this issue 11 months ago • 3 comments

With the attached .chm file I don't get a scrollbar on pages which are longer than the screen, and I also can't seem to scroll with the keyboard. The first page "Introduction" shows the problem, but it seems to apply to all pages long than one screen:

noscrollchm.zip

I've discovered I do get a scrollbar if I disable Javascript in the settings (and restart for the change to have effect), so there's a workaround at least.

(I wonder if Javascript off might be a better default as well as solving this...)

ojwb avatar Mar 12 '24 20:03 ojwb

Hi.

You didn't specify the version of the application and what engine it's built with - WebKit or WebEngine, but it probably doesn't matter.

Your sample chm file is generated with the Help+Manual program and has a characteristic layout with a non-scrolling header. And if the header gets the focus, scrolling of the entire page is blocked. Thus, it is enough to click on the main content and the page scrolling will work properly again.

u-235 avatar Mar 13 '24 19:03 u-235

Oh sorry, I'm using the Debian unstable package kchmviewer 8.0-2 (8.0 seems to be the latest upstream release).

I couldn't see anywhere in the app which tells me the HTML engine in use, but from the dynamic linker it seems to be WebEngine:

$ ldd /usr/bin/kchmviewer | grep Web
	libQt5WebEngineWidgets.so.5 => /lib/x86_64-linux-gnu/libQt5WebEngineWidgets.so.5 (0x00007fed8f43a000)
	libQt5WebEngineCore.so.5 => /lib/x86_64-linux-gnu/libQt5WebEngineCore.so.5 (0x00007fed86a00000)
	libQt5WebChannel.so.5 => /lib/x86_64-linux-gnu/libQt5WebChannel.so.5 (0x00007fed8eab3000)

Thus, it is enough to click on the main content and the page scrolling will work properly again.

This doesn't seem to work for me.

ojwb avatar Mar 13 '24 19:03 ojwb

Well, I built kchmviewer with WebEngine and the pages really don't scroll, unlike the WebKit version of the app. And it seems to be a problem in the application code. Unfortunately, I don't know what can be fixed.

u-235 avatar Mar 15 '24 19:03 u-235