chamburr / glance

🔎 All-in-one Quick Look plugin
MIT License
427 stars 16 forks source link

Scroll is not working in code files previewed in Finder #23

Closed dserodio closed 9 months ago

dserodio commented 2 years ago

Scrolling is not working in code files like .md, .json or .php when Quick Look is opened by pressing Spacebar in Finder, neither using two finger drag on the trackpad or by dragging the scrollbar. Extensions that are understood by macOS by default like .pdf or .csv work file.

However, when the Quick Look preview is opened via qlmanage -p $file in the Terminal, the scroll works as expected.

I've already tried restarting QuickLookUIService via Activity Monitor (a common fix for Quick Look problems) and the problem persists.

Environment

BerginJay commented 1 year ago

Same issue here. Scrolling is also not working in .py files when pressing the spacebar in Finder.

The scroll works as expected when the Quick Look preview is opened via qlmanage -p $file in the Terminal. BUT, there is a prompt message like this:

2022-10-28 15:07:50.623 qlmanage[15839:1000350] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x820b, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2022-10-28 15:07:50.662 qlmanage[15839:1000350] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xc107, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2022-10-28 15:07:55.801 qlmanage[15839:1000380] Persistent UI failed to open file file:///Users/test/Library/Saved%20Application%20State/com.apple.quicklook.qlmanage.savedState/window_2.data: No such file or directory (2)

This issue is solved by restarting glance using sudo open /Applications/Glance.app.

I found a similar issue https://github.com/anthonygelibert/QLColorCode/issues/51. It may be helpful.

Environment

chamburr commented 1 year ago

I am unable to reproduce this issue. I tried various file types including .py files, and scrolling works smoothly. Could you check if this is still an issue on macOS Ventura?

dserodio commented 1 year ago

That's so weird. This has been broken for a while, but it's working fine now on macOS Monterey 12.6.1

lucasrla commented 1 year ago

I'm also on macOS 12.6.1 and scrolling on Quick Look is not working with .py, .md, .js, .rb, .css or .json files here.

Following BerginJay's comment, I tried qlmanage -p $FILE_PATH and then it did work.

BTW, I also got similar error messages following the qlmanage command:

2022-11-18 20:38:09.491 qlmanage[3116:1538400] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x7a07, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2022-11-18 20:38:09.520 qlmanage[3116:1538400] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x14007, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.

Unfortunately I could not make the scrolling work by reopening glance with sudo open /Applications/Glance.app. For me scrolling seems to only work via qlmanage -p $FILE_PATH.

Any ideas?

Thanks!

dserodio commented 1 year ago

That's so weird. This has been broken for a while, but it's working fine now on macOS Monterey 12.6.1

Sorry for the confusion, I probably messed up my previous test. Scrolling does not work when previewing a .py file via Finder, only by qlmanage -p

viewhang commented 1 year ago

Scrolling is also not working in .java Apple M1 Pro 14 Mac OS 13.1

frumbert commented 1 year ago

Scrolling doesn't work for me. For any working file type, such as json or txt.

I use a wired usb mouse on a 2020 M1 mac mini, so no touchpad, so scrollbars are always on.

Glance 1.5.0, Monteray 12.6.3 (21G419)

jkmacc-LANL commented 11 months ago

I reinstalled (from Homebrew), and this problem went away. macOS 12.7.1