PDF Embed API and DOM manipulation
Hello, I have a perhaps unusual use case where I'm loading a document into a page view adjacent to some of my own content that's discussing the document. Further down the page I have more discussion content about the same PDF and would like to be able to reposition that embed viewer to be closer to the later content when the user clicks a button down there.
I'm able to use a plain old javascript insertBefore() to manipulate the DOM and accomplish this, but an unexpected side effect is that the browser immediately scrolls back to the top of the page when I do it. That wouldn't normally happen, so could something in the embed API's event listener be responding to the DOM being changed? If so, is there any way I could suppress that response?
Thanks for any help!
James
