joeattardi / picmo

JavaScript emoji picker. Any app, any framework.
https://picmojs.com
MIT License
1.19k stars 117 forks source link

Picker won't display when localStorage is not available #184

Closed joeattardi closed 1 year ago

joeattardi commented 2 years ago

Currently trying to show a picker in a browser where localStorage is not available, the following error is thrown:

Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

This needs to be checked and if local storage is not available, recents should not be shown.

joeattardi commented 2 years ago

This is fixed in the upcoming 5.0.0 release. Will close the issue upon release.

Also should provide a 4.x fix as well.

joeattardi commented 2 years ago

This issue is resolved in v5.0.0-beta.6.

dEEpProjects commented 1 year ago

This issue is still reproducible with version 5.7.5 on Chrome 109.0.5414.119 in incognito mode.

Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
    at new jt (https://unpkg.com/picmo@5.7.5/dist/index.js:774:11)
    at Et (https://unpkg.com/picmo@5.7.5/dist/index.js:799:43)
    at Ao (https://unpkg.com/picmo@5.7.5/dist/index.js:1995:13)
    at https://fiddle.jshell.net/p42n1wgv/show/?editor_console=:114:16

To reproduce it, open the fiddle in an incognito Chrome.

joeattardi commented 1 year ago

Should be fixed for real this time with the just released 5.7.6. I just tried your fiddle but using the newer version, and it seems to be working ok now. Let me know if there's still an issue.