Hi everyone,
if you still care about your privacy and therefor using Firefox but always hitting "Unresponsive script" timeouts when previewing files in M-Files, I spent time debugging this and found both the root cause and a working solution.
What I found
The embedded Apryse WebViewer uses Virtual Display Mode by default to render only visible PDF pages. Inside M-Files' flexbox preview pane, Firefox synchronously reports every sub-pixel container size change back to WebViewer's resize observer. Chrome coalesces these events; Firefox does not. The result is an infinite
measure → render → reflow loop that pins a CPU core until the browser kills the script.The fix I wrote
I created a Tampermonkey userscript that auto-detects any WebViewer iframe and rewrites its
src to append disableVirtualDisplayMode=1 before the document loads. This bypasses the broken virtual list and renders pages conventionally, eliminating the hang entirely.How to use it
-
Install Tampermonkey in Firefox
-
Install the script: WebViewer Disable Virtual Display Mode (Universal)
-
Reload M-Files — it runs silently on any site embedding WebViewer
No configuration needed. It only touches
pdftron-web iframes and leaves everything else alone.Posting this here so other Firefox users can continue using M-Files web and maybe sometime in the future M-Files will address this issue, as this is fairly easy fix and the userscript won't be needed anymore.
Best regards, cv3tko.
