Ryan Helmoski

Results 4 comments of Ryan Helmoski

The scroll appears to happen when `viewerevent` `pagerender` occurs. The following approach serves as a workaround: ```js const preview = new Box.Preview(); const originalScrollY = window.scrollY; preview.addListener("viewerevent", (e) => {...

The `pagerender` `viewerevent` appears to only occur for certain document types. For example, it occurs for PDFs, but not images. Thus, the above workaround won't work for all document types.

After playing around with the events some more, it seems listening to the `load` event works better than `viewerevent`. You just have to add a `setTimeout` in the event handler....

I haven't been able to come up with a way to do this without making significant changes to electrolyte's api. The problem lies in trying to use the asynchronous results...