Git Product home page Git Product logo

Comments (16)

porg avatar porg commented on August 18, 2024

Interestingly when triggering QuickLook via Terminal the scrolling works

qlmanage -p /Users/myUser/path/to/Scrolling\ Demo.md
Testing Quick Look preview with files:
	/Users/myUser/path/to/Scrolling Demo.md
2022-03-21 12:35:46.902 qlmanage[39935:1023163] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8c13, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2022-03-21 12:35:46.974 qlmanage[39935:1023163] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xc01b, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2022-03-21 12:36:02.005 qlmanage[39935:1023176] Persistent UI failed to open file file:///Users/myUser/Library/Saved%20Application%20State/com.apple.quicklook.qlmanage.savedState/window_1.data: No such file or directory (2)

QuickLook window differences whether triggered via Finder or Terminal

QuickLook triggered via Finder

QuickLook triggered via Terminal

from qlmarkdown.

sbarex avatar sbarex commented on August 18, 2024

The bug is only for long documents? Can you share a .md file?

There are no API to control the buttons in the Quick Look title window (also the title is not customizable before macOS 12). The buttons (and the "debug" title prefix) are automatically inserted by qlmanage.

from qlmarkdown.

sbarex avatar sbarex commented on August 18, 2024

I suggest you try to convert the markdown file to html with the utility:

/Applications/QLMarkdown.app/Contents/Resources/qlmarkdown_cli /Users/myUser/path/to/Scrolling\ Demo.md -o /Users/myUser/path/to/Scrolling\ Demo.html

The try to view the generated html with the Quick Look. If the bug still occurs it means that it is not due to my application but to what problem of your system (the preview of html files is always managed by the operating system).

from qlmarkdown.

porg avatar porg commented on August 18, 2024

Closing this for now as a false alarm

Just experienced something really mysterious. Probably we will never know how to explain this.

I used your qlmarkdown_cli but unintentionally used the same file for input and output, hence overwrote the MD with the HTML. Then used TimeMachine to restore the MD from backup.

From then on all my .MD files everywhere on disk suddenly scroll correctly again in QuickLook! 🙂

I suspect some caching or config that was wrong and that was reset by the procedure as an unintended but welcome side effect.

Whatever has happened behind the scenes. Now scrolling works again. Both on MD and the manually converted HTML version, which I wrote to a correct html-suffixed file after I restored the backup.

from qlmarkdown.

porg avatar porg commented on August 18, 2024

Sorry I oversaw one more question of you, which I want to answer, nevertheless of having closed this issue myself:

The bug is only for long documents? Can you share a .md file?

  • "Longer document" as in "more than what fits into the default viewport" as in "everything that requires scrolling".
  • Every .MD document which fulfilled that criteria, triggered the bug. Experienced this the last 1-3 weeks as I recall it.
    Now it's gone, luckily.

Sample: This 5 paragraph lorem ipsum: Scrolling Demo.md.txt

from qlmarkdown.

porg avatar porg commented on August 18, 2024

Reopening

  • Re-experienced the bug
  • Now could better reproduce what leads to getting out of the situation:
    • qlmanage -r -> Bug persists.
    • Restart Finder -> Scrolling works again. So what could be the cause?
  • FYI mdls myfile.md on my system gives this Uniform Type Identifier:
…
kMDItemKind                            = "Markdown Document"
…
kMDItemContentTypeTree                 = (
    "net.daringfireball.markdown",
    "public.plain-text",
    "public.text",
    "public.data",
    "public.item",
    "public.content"
)
…

from qlmarkdown.

sbarex avatar sbarex commented on August 18, 2024

have you tried as I told you to generate the html file with the command line utility and then try to see if the preview of the html file has problems?

from qlmarkdown.

porg avatar porg commented on August 18, 2024

As I wrote yesterday:

I used your qlmarkdown_cli but unintentionally used the same file for input and output, hence overwrote the MD with the HTML. Then used TimeMachine to restore the MD from backup. From then on all my .MD files everywhere on disk suddenly scroll correctly again in QuickLook! 🙂

And now the Finder restart has also resolved the situation again.

As of now both a .MD and its .HTML counterpart gained from a qlmarkdown_cli conversion scroll correctly.

When I get into the bug situation again, I will try a HTML conversion with qlmarkdown_cli and see whether it differs in scrolling behavior. And only then restart Finder.

from qlmarkdown.

porg avatar porg commented on August 18, 2024

I hereby re-open the issue until we have more clarity on it.

from qlmarkdown.

porg avatar porg commented on August 18, 2024

Encountered it again:

  1. file.md in QuickLook in Finder had no scrolling.
  2. qlmarkdown_cli file.md -o file.html
  3. Now when using QuickLook in Finder the situation is: ✅file.html scrolls, ❌ file.md does not scroll!
  4. qlmanage -r --> ❌ Situation unchanged to step 3.
  5. Closing Finder window. Navigating there again --> ❌ Situation unchanged to step 3.
  6. Relaunching Finder. Navigating there again --> ✅ file.html scrolls, ✅ file.md scrolls!

from qlmarkdown.

porg avatar porg commented on August 18, 2024

Encountered it again. Restarted macOS (instead of just Finder) --> Markdown in QuickLook scrolls normal again.

Question is, what leads to scrolling being stuck? And where/who is the proper addressee of this bug report?

from qlmarkdown.

sbarex avatar sbarex commented on August 18, 2024

Unfortunately I don't have a macOS 11 to test. In macos 12 a different API is used which seems to work much better. Before Monterey there are a lot of bugs in the webkit view inside a quicklook.

Try to replace the qlmarkdown app with this debug version that use the deprecated webview. Thre preview shows a "LEGACY VIEW" warning at the first line. This version cannot shows remote images.

QLMarkdown.zip

from qlmarkdown.

porg avatar porg commented on August 18, 2024

Thanks for the offer.

  • Though no remote image support is worse than having to relaunch Finder every here & then to get scrolling working again. So I will not use it. Unless you want me to test it actively to gain more knowhow on the bug.
  • Offtopic: Sadly with my Retina MacBook Pro 15'' (Mid 2014) I'm not qualified for macOS Monterrey. Although cynically I get a notification that it's available for me, but as soon as clicked it leads me to System Preferences where it tells me I have the newest Big Sur upgrade available. Sadly again a QA screwup, which did happen very rarely in the Steve Jobs era.

from qlmarkdown.

sbarex avatar sbarex commented on August 18, 2024

The remote image restriction is only temporary. if the bug gets fixed I could try to implement remote image support. It seems that with the old api it is not possible to load images due to the sandbox limitations.

from qlmarkdown.

porg avatar porg commented on August 18, 2024

Then my pro/con balance is clear and I stick with this bug on macOS Big Sur as-is and use a Finder relaunch whenever necessary.

from qlmarkdown.

porg avatar porg commented on August 18, 2024

Scrolling in QLManage in Finder fails at a certain point but continues working in qlmanage

New observation

  • When the Finder reaches that broken state where scrolling does not work anymore.
  • Then invoking via qlmanage -p <file> still produces a QuickLook window with correct scrolling.
    • So I assume the bug cause seems to be in Finder rather than QuickLook.
  • 👇 Btw meanwhile I made myself a cool QuickLook productivity feature, that I share with you 👇

Open selected text as filepath in QuickLook

  • I build myself a Automator Quick Action (aka service)
  • and via System Preferences → Keyboard → Services assigned it the hotkey ⌃⌥ ⌘ - SPACE.
  • The currently selected text gets passed as a filepath to qlmanage.
  • Whenever I read a relative filepath to a config file on a support web page, in an email, diary entry, etc, I just select the filepath text and press ⌃⌥ ⌘ - SPACE and have my QuickLook of it instantly. Great!

Open selected text as filepath in QuickLook

  • This also continued to work when the Finder was in the broken state.
  • Dragged the Markdown file onto TextEdit to get its filepath, then selected the filepath, and ⌃⌥ ⌘ - SPACE instantly gave me a scrolling QuickLook window.

from qlmarkdown.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.