Closed nicroto closed 5 years ago
Hi. The demo even runs on Internet Explorer 11. So other browsers should not be a problem. I have no way to check it on old Safari browsers. Is there no way to update the Safari to the latest version? Can you open up the console on your side and look what errors it throws? Maybe it does not support WebWorkers?
There are no errors in the console. Just the cloud doesn't get rendered.
Here is the page that gets rendered:
```html
I would like to help out in fixing this, so let me know if you want me to test something specific.
I hope you will reopen this issue, since there are a lot of these devices out there, still. I personally would like to use the VWC, but I need to support that browser.
I really don't know why it's not working by you.
Here is a screenshot from a mobile safari.
Does this one work on your safari? This one is without WebWorkers and without Vue. https://seregpie.github.io/almete.WordCloud/
Thanks for reopening the issue and testing.
Nothing here, as well, unfortunately. There are no errors in the console, either. Is there any javascript you want me to probe on the device (some API that you suspect might not be available)?
```html
Is it possible, that getImageData
is just not supported on older ios versions?
https://stackoverflow.com/questions/10517154/canvas-getimagedata-not-working-on-mobile-safari
This is the only way to get text pixels, so I can calculate where to place them.
There are also some external font issues. https://github.com/highcharts/highcharts/issues/6902 This could be the problem. You can try to use some default ios fonts. Maybe this will work.
I can confirm that the following does NOT produce an error:
var canvas = document.createElement('canvas');
var ctx = canvas.getContext("2d");
var imageData = ctx.getImageData(0,0,canvas.width,canvas.height);
This API is available on the mobile Safari 10.
I've spent an hour debugging and what I see happening, but just lack the better understanding to fully grasp, is:
At asyncComputed/cloudWords/index.js:
let elementAspect = getNormalizedAspect([elementWidth, elementHeight]);
This is not resolved and there are a ton of those devices out there still...
Ok. Ok. Maybe someday one will help with this. I cannot fix this until I know where the bug is.
@nicroto @SeregPie hey guys, I had an issue with the same symptoms (no render, no errors) on an FFox desktop. Once i realized that the component was swallowing errors w/ the errorHandler noop method and turned that off, it was pretty easy for me to figure it out.
Turns out my boss' version of FFox predates the promise.prototype.finally implementation, but the "Promise.then().then().........finally() is not a function" error was getting swallowed. All i had to do was add the shim for promise.prototype.finally and it worked. @nicroto I'm guessing you're having the same issue with mobile safari, promise.finally() wasn't implemented until safari 11.1
as an aside, swallowing errors within your component is probably a bad idea, just my 2¢
@andersponders thank you very much. strange, that babel-polyfill does not fix this issue. the new version will come (some day), and i will make many things the other way it is right now.
Awesome project, Sergej. Thanks for building this and MIT-licensing it.
I just checked the demo on an older iPad (4th generation), which runs the previous official iOS (10.3.3), but the word cloud didn't show up. There are a lot of these devices in use, still.
Do you have any idea are there any versions (and which ones) of iOS (mobile Safari) that are able to run the component?