WPS/egon.io

Chromium-based Browsers: Export to png results in error

phr0 opened this issue · 1 comments

phr0 commented

Describe the bug
Exporting a story as a png image results in an error being thrown and no png being exported, when using a chromium based browser.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://www.wps.de/modeler/index.html
  2. Click on the "Export story as SVG or PNG image, or animated HTML" button
  3. Click on "PNG"
  4. No download starts and an error message appears in the dev console
Uncaught TypeError: Cannot read properties of undefined (reading 'parentNode')
    at extractSVG (pngDownload.js:107:5)
    at downloadPNG (pngDownload.js:23:13)
    at HTMLButtonElement.<anonymous> (app.js:546:3)

Expected behavior
After clicking the "PNG" button a download of the exported story as a png image should start.

Screenshots
image

Tested with

  • Modeler Version: v1.3.2
  • Browser: Microsoft Edge Version 107.0.1418.42 and Google Chrome Version 107.0.5304.107
  • OS: Windows 10
phr0 commented

Seems to me like this is caused by this commit from over three years ago: e4403da. If I just revert these changes, the download works as expected.