highcharts / highcharts/highcharts-angular
Error while exporting chart images with styledMode in Safari
- Dominant language
- JavaScript
- Stars
- 444
- Forks
- 121
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug
When I try to export a chart with `styledMode` set to true, I get an error in Safari, and the chart does not download (below is a screen shot of the error in the browser console). This occurs for me while running the wrapper's demo app locally as well as on separate project I have in production. I am not sure if this is an issue specifically with the angular wrapper or highcharts itself. I do not have this issue in other browsers (Chrome, Firefox, and Edge).

### Expected behavior
I expect the chart to export with the custom CSS styles defined for the chart.
### Demo
I have previously opened a [thread](https://www.highcharts.com/forum/viewtopic.php?f=12&t=50680) on the highcharts support forums regarding this issue. A mod tried to replicate the issue in a [stackblitz](https://stackblitz.com/edit/highcharts-angular-line-95qpfs?file=src%2Fapp%2Fapp.component.ts) but was unable to reproduce the error. Exporting the chart in the stackblitz was actually working for me as well, including in Safari. I have tried recreating a separate stackblitz, but have been unsuccessful at recreating the error.
I have also created a standalone angular [project](https://github.com/vcward/highcharts-test) (using Angular-CLI 15.2.6) with the latest highcharts and highcharts-angular wrapper. Running it locally produces the same error for me; however, someone else on the forum stated that the export worked fine for them.
#### Steps required to recreate the problem in the demo:
##### Angular Wrapper
- Modify the wrappers' demo app so that a chart has styledMode enabled (in my case I modified `lazy-loading-chart.component.ts`)
- Run the app locally and try to export the lazy-loaded highstock chart
- In Safari, the export fails with the error shown above.
##### Own github project
- Download repo and install dependencies
- Run app with `ng serve`
- Try to export chart in Safari
### Setup used
- NodeJS version 18.16.0
- Angular version 15.2.6
- TypeScript version 4.9.5
I am running a 2018 Macbook Pro with OS Ventura 13.3.1 and Safari 16.4.
If there is any other information that would be helpful, I will try to provide it as best I can.
Contributor guide
Assessment
This issue has not been assessed yet.