-
-
Notifications
You must be signed in to change notification settings - Fork 80
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
Uncaught TypeError: Container is null #155
Comments
Hi! Thanks for the kind words :) I'm not really sure what's causing this, it looks like you might be trying to create a new color picker before the HTML container for it has been loaded and parsed? iro.js should be able to handle that though, so this is weird :/ I can't recreate it myself, so if you're able to reproduce the problem in a Codepen or a Github repo that would be really helpful. Cheers! |
Hello! Okay, I found the problem and I have to admit it is basically sitting in front of my screen :D This happens, when one copy&pastes the Color Picker object creation snipplet from one place to another in the java script, renames the HTML ID of the container forgets about the old code. The pasted code snipplet works, but the old one complains that it can't find the container under the given name...and justifiably so.
Anyway the error is gone now. Sorry for bothering you with my learning JavaScript problems here :-) |
No worries! Good to see that you got to the bottom of it anyway :) |
Hello!
A first thanks a lot for this nice color picker! I used it on my ESP8226 Smart Lamp project for quite a while now and I like it! :) However I updated today from an old version (please don't ask me which one, some years old :-)) and now Firefox Console throws a failure:
![grafik](https://user-images.githubusercontent.com/76655064/103173465-69d93b00-485b-11eb-8d04-5de95e04993e.png)
I am not an expert, but I had a look at the code and it seems it has something to do with finding the HTML container aka parent element of type div, which does obviously fail and return a null. I double checked my HTML and JS and copied in the example code in the end, but it didn't change anything:
However the color picker works so far (surprisingly), I can use the events, so it works so far. What doesn't work is accessing it via its HTML ID or class via CSS, which points a bit into the direction as well, I think.
Best regards
Daniel
The text was updated successfully, but these errors were encountered: