sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.81k stars 1.74k forks source link

Bad UI for chm file (autohotkey docs) #3604

Open Stiku75 opened 1 year ago

Stiku75 commented 1 year ago

Hello all!

I run a problem. I open AHK help file in Sumatra and can't write in the search box. When I press a keyboard button then mostly not happening anything. Only "f" do something, looks like go to full screen. When I click on the help doc search box, a cursor not appear in there, but the initial text vanishing. I look it over the shortcut key's but can't find what cause the behavior. I feel like the problem is a stuck or switched alt or ctrl key. But other program work fine.

I use Windows 10. if anyone can help me I rely thankful! sumatra 1 sumatra 2

GitHubRulesOK commented 1 year ago

CHM files have 3 ways to View over the years MS have depreciated underlying support for .HLP then .CHM functions as potential security flaws and CHM relied to a degree on Internet Explorer to render the contents, In some cases Authors would use less well supported methods (I know, because I did in the past). Thus not all pages can function when embeded inside SumatraPDF.

There are 2 other views where search is active and works well (MS Viewer and SumatraPDF Fixed UI)

image

Within the mode you are using the only Search SumatraPDF can call on is the in page search hotkey / image

tactilis commented 1 year ago

There are 2 other views where search is active and works well (MS Viewer and SumatraPDF Fixed UI)

The MS Viewer being hh.exe which is located in C:\Windows

GitHubRulesOK commented 1 year ago

@kjk There does seem to be an issue since it is possible to use that search page via cut and paste sample file for testing AutoHotkey.chm.zip

image

Stiku75 commented 1 year ago

Thank the reply!

I confused, because i use ahk help the previsions day and it's fine, but now... Looks like I opened the help other way and it cause my confusion. Like right click on the tray icon.

I think to use other viewer for the ahk help. When I open through start menu by typing "ahk" and enter, then open in MS helper and this work. Or use web browser for now on.

Now I change the default app to CHM files.

One more I thank for all to help me!

kjk commented 1 year ago

This UI is implemented in html / javascript. I see a bunch of exceptions, most likely from mshtml:

Exception thrown at 0x00007FFF0989531C in SumatraPDF.exe: Microsoft C++ exception: Js::JavascriptExceptionObject at memory location 0x000000537A4FB950.

I don't know why hh shows it ok but I have low expectations to figure this out. mshtml is undocumented, outdated crap.

Maybe switching to WebView2 would fix it.

kjk commented 3 months ago

Verified it's not a regression i.e. it worked liked this since at least 3.2

GitHubRulesOK commented 3 months ago

It was primarily designed for CSS and browser use see the icons are online web format image

look at the Home Icon it is underlaid without CSS style as Δelta so the CHM is missing the expected browser facilities

<a href="https://www.autohotkey.com" title="Go to the homepage" data-translate="" aria-label="Go to the homepage">Δ</a>

image