Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to dispatch click on Chrome/Safari #382

Closed
bcardiff opened this issue Nov 8, 2017 · 2 comments · Fixed by #463
Closed

Unable to dispatch click on Chrome/Safari #382

bcardiff opened this issue Nov 8, 2017 · 2 comments · Fixed by #463

Comments

@bcardiff
Copy link

bcardiff commented Nov 8, 2017

I am getting the following error while calling saveAs

Uncaught TypeError: Failed to execute 'dispatchEvent' on 'EventTarget': parameter 1 is not of type 'Event'.

file-saver@^1.3.3
Chrome Version 61.0.3163.100 (Official Build) (64-bit)
Safari Version 11.0.1 (12604.3.5.1.1)
OSX Sierra 10.12.6 (16G1036)

It goes away if I revert #152 partially with

+++      var event = document.createEvent("MouseEvents");
+++      event.initMouseEvent("click", true, true, window, 0, 0, 0, 80, 20, false, false, false, false, 0, null);
---      var event = new MouseEvent("click");

I get that initMouseEvent is deprecated but I found no other workaround.

In stackoverflow someone points points that maybe there are some properties missing with using MouseEvent constructor. But, as somebody else, I couldn't solve the issue with those properties.

@philiply
Copy link

just ran into this issue. any updates?

@Ruffio
Copy link

Ruffio commented Mar 7, 2018

@bcardiff can you provide a JSBin or similar testpage demonstrating the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants