nolanlawson / emoji-picker-element

A lightweight emoji picker for the modern web
https://nolanlawson.github.io/emoji-picker-element/
Apache License 2.0
1.47k stars 83 forks source link

Firefox throws 'this._dbCreate is not a function' #421

Closed anclyakeks closed 5 months ago

anclyakeks commented 5 months ago

Hello, today got this error when trying to use picker in latest version of Mozilla Firefox
Tested picker on chromium based browsers, Safari works fine What are the possible solutions?

image image

nolanlawson commented 5 months ago

I don't understand how this error is possible. Is there some extension or something else with your Firefox browser that is causing problems?

I tried loading https://nolanlawson.github.io/emoji-picker-element/ in Firefox v124.0.2 on Ubuntu and the picker works fine.

anclyakeks commented 5 months ago

I don't understand how this error is possible. Is there some extension or something else with your Firefox browser that is causing problems?

I tried loading https://nolanlawson.github.io/emoji-picker-element/ in Firefox v124.0.2 on Ubuntu and the picker works fine.

I think problem is that im using Webpack, your demos is loading fine though, and also, for example, if you embed a picker simply, without using npm And no, there is no extension on browser, its new and clean

Looks like problem fixes when function not using microtask (dirty) image

nolanlawson commented 5 months ago

This sounds like an issue with your setup, although I'm not sure what issue exactly you're running into, since I don't have a reproducible test case.

Removing the qM code above may cause bugs; the code assumes that qM will be called for timing reasons.

My hunch is that you have some Babel transformation that is doing something funky with the () => {} arrow function, since any reference to this inside of an arrow function should refer to the this from the outer scope.