• Resolved Michael Kastler

    (@mkastler)


    Hi! Generally love the code – it’s working great, improving UX 100% on some of our sites!

    One of our clients recently had Pre-Render + Moderate enabled however, and was experiencing odd behavior on pages with PDF links. They would open on hover rather than waiting for click. When we changed setting to Conservative this behavior went away.

    The format of the links was like this (spaces added to the tag so you can see it not as a link:
    < a target="_blank" rel="noopener">Our Document< /a >

    I found that changing settings to Conservative made it so this behavior with PDF’s doesn’t occur. If you are unable to recreate the issue, let me know and I can turn it back to “broken” again for a short while, or see if I can replicate and share in our staging environment.

    FYI We are using Divi as a pagebuilder but otherwise have few plugins and nothing non-standard. Since we have the issue resolved, there’s no need for immediate response but wanted the issue to be flagged for dev to review. Thanks!

    The page I need help with: [log in to see the link]

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Weston Ruter

    (@westonruter)

    Hello! Thanks for the feedback.

    We’ve actually already addressed this in a pull request which has been merged, but it isn’t yet released on www.ads-software.com. We’ve updated the rules to exclude files in the wp-content/uploads directory. PDFs aren’t supposed to be speculatively loaded.

    I have created a ZIP build of the plugin of the which you can use to test.

    Thread Starter Michael Kastler

    (@mkastler)

    Awesome, thanks @westonruter !

    Quick follow-up question: do the rules only exclude files from /wp-content/uploads, or will that be expanded to include any file download link? Many clients have external links as well, so it would be helpful if no documents were pre-loaded.

    Just my .02. I’ll download and play with the new version of the plugin when I get a chance, and look for the fix to be included in a coming release. Thanks!

    Plugin Author Weston Ruter

    (@westonruter)

    It only speculatively loads links on the same site. So if you’re linking to files on other domains, they won’t preloaded.

    Also, when you say “They would open on hover rather than waiting for click.” Do you mean that the PDF would load when hovering as if they had clicked on it? That would certainly be unexpected. In what way did it “open”?

    Thread Starter Michael Kastler

    (@mkastler)

    OK that makes sense that you wouldn’t be preloading external links at all – if I had given it 30s of thought i wouldn’t have had to ask lol

    And yes, that’s exactly what i meant about the PDF’s loading – when hovering over the link, it would open the PDF file in the same browser window, without a mouse click. I did not test this on mobile, only desktop. Sorry if I wasn’t clear about that!

    Plugin Author Weston Ruter

    (@westonruter)

    It’s a good question. Cross-domain speculative loading could possible in the future, but this is not support right now.

    For hovering over the PDF link automatically opening… that seems like a browser bug. What browser was this observed happening in?

    Plugin Author Weston Ruter

    (@westonruter)

    Can you reproduce the issue with a PDF opening automatically at this test page? https://retractable-crane-47a33d.instawp.xyz/pdf/

    Thread Starter Michael Kastler

    (@mkastler)

    Yes, that does exactly the same! So it seems to have something to do with _blank or noopener maybe?

    Thread Starter Michael Kastler

    (@mkastler)

    And forgot to mention, this is in Chrome 64, v126.0.6452.3?(most recent official build)

    Plugin Author Weston Ruter

    (@westonruter)

    It doesn’t happen for me either on ChromeOS or on Chrome for Mac. I wonder if there is some browser plugin for a PDF reader that is causing the problem here?

    Thread Starter Michael Kastler

    (@mkastler)

    Aha, yeah great question … let me test disabling my extensions and I’ll get back to you with the results.

    Thread Starter Michael Kastler

    (@mkastler)

    Yep, that was it! Unfortunately, the extension that breaks it is the official Adobe Acrobat Chrome extension. I’ve got v24.5.1.0 which I believe is the most current. I don’t know if it matters, but I have a paid Adobe account that includes Acrobat in it.

    If that extension is enabled, I see the instant open behavior. With it disabled, things work as expected. Let me know if I can give you more info!

    Thread Starter Michael Kastler

    (@mkastler)

    In case it helps, here’s all the settings I have enabled for the Adobe extension.
    https://app.screencast.com/y7x8PiQ3xSx2N
    https://app.screencast.com/FCkb4XE2ykWEK
    https://app.screencast.com/EGYHhE9H5x0Qt

    Glad to see it looks like this issue is already fixed! I can confirm it only affected my user with the Creative Cloud subscription with the Adobe Acrobat Chrome plugin active. It didn’t affect Chrome’s built in pdf renderer.

    Plugin Author Weston Ruter

    (@westonruter)

    Yes, it was fixed as part of the 1.3.0 release which went out yesterday.

    • This reply was modified 6 months, 1 week ago by Weston Ruter.
Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘PDF Files open on hover’ is closed to new replies.