[BUG] 'Empty string passed to getElementById().' warning on Firefox.
DarkNami opened this issue ยท 7 comments
Describe the bug
If the <input>
has not set ID
attribute, it will cause 'Empty string passed to getElementById().' warning on Firefox.
To Reproduce
Steps to reproduce the behavior and minimal code:
- Launch Firefox
- Open URL https://palcarazm.github.io/bootstrap5-toggle/
- Press F12 open developer panel.
- Click 'Console' panel.
- Hover cursor to any bootstrap toggle.
- You will see many 'Empty string passed to getElementById().' warnings.
Expected behavior
Don't add for
attribute if attribute ID
does not exist.
Desktop:
- OS: Windows 10
- Browser: Firefox
- Version: 108
Additional context
I had fix this issue for old bootstrap4-toggle on my fork.
DarkNami@76fb0c1
Do you need I create a PR for this issue or palcarazm can fix it ? (it is short, only 4 lines changes.)
Hi! ๐
Thanks for your issue. You are helping to improve Bootstrap 5 toggle.
Hi @DarkNami ,
Thanks for the issue ๐.
If you can do a PR so you will be listed as controntibutor.
If you cann't I will read and import your code an add the source in comments.
Hi @palcarazm ,
I am not familiar with GitHub. ๐ต
I have tried to fork your repositorie palcarazm / bootstrap5-toggle
, but GitHub say 'No more forks can be created. These forks already exist.'. I don't know how to sync my bootstrap4-toggle
fork to your bootstrap5-toggle
. ๐ค
Okay, don't worry. I will merge your changes and put you as co-author of the commit.
Thank you. ๐
Done! It will be released in the next patch.
I have tested it, warning is stopped.
Thank you.