Skip to main content
Participant
January 27, 2023
Question

Embed PDF Viewer - Undesired Focus Scrolling on Browser Zoom

  • January 27, 2023
  • 2 replies
  • 1588 views

Hi, I'm using the Embed PDF Viewer API with in-line embed mode in my web application, and am observing undesirable behavior where the viewer will automatically scroll the browser page and set focus to the top of the embedded PDF in desktop browsers, even when "focusOnRendering" is explicitly set to false, upon adjusting the zoom level of the browser. This occurs when both page content and the embedded viewer are both in view, and seems to be reliably reproduced on Chrome and Edge. Even worse, on some devices such as a Windows laptop with display scaling enabled, the browser immediately automatically scrolls the page to the top of the PDF on page load without changing the browser zoom first.

 

This CodePen demonstrates this behavior: 
Adobe Embed API: Changing browser zoom auto-scrolls PDF into focus (codepen.io)

 

This is undesired because the user may be zooming in to read the content that precedes the embedded PDF, but now they have to manually scroll back to it after the PDF viewer automatically scrolled. I believe this is a bug, and if it is not, can a new parameter be added to prevent this behavior? Thanks!

    This topic has been closed for replies.

    2 replies

    Joel Geraci
    Community Expert
    Community Expert
    January 27, 2023

    That's a really interesting bug. I'm sharing with the product team. Thanks for creating the CodePan.

    jra85Author
    Participant
    January 28, 2023

    Thank you! This is actually a high-priority issue for our (medical industry) application, as immediately preceding the PDF is a question that must be read and answered. This issue risks the question itself being missed by the user. Any ability to expedite a resolution would be greatly appreciated.

    Also, I've updated the CodePen to use the new API JS rather than the deprecated version. The issue still exists as described.

    Joel Geraci
    Community Expert
    Community Expert
    January 30, 2023

    Thanks for updating the CodePen. Switching to the modern viewer was the first thing I tried and was planning on creating a sample but again, you've done the work for me so thanks.

    jra85Author
    Participant
    January 27, 2023

    Additionally, I just noticed when testing the CodePen that the PDF actually also automatically scrolls into view upon changing the window size as well (or minimizing/maximizing the window)!