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

[BUG] 'Empty string passed to getElementById().' warning on Firefox. #80

Closed
DarkNami opened this issue Dec 14, 2022 · 7 comments · Fixed by #81
Closed

[BUG] 'Empty string passed to getElementById().' warning on Firefox. #80

DarkNami opened this issue Dec 14, 2022 · 7 comments · Fixed by #81
Assignees
Labels
bug Something isn't working

Comments

@DarkNami
Copy link

DarkNami commented Dec 14, 2022

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:

  1. Launch Firefox
  2. Open URL https://palcarazm.github.io/bootstrap5-toggle/
  3. Press F12 open developer panel.
  4. Click 'Console' panel.
  5. Hover cursor to any bootstrap toggle.
  6. You will see many 'Empty string passed to getElementById().' warnings.

Expected behavior
Don't add for attribute if attribute ID does not exist.

Screenshots
Issue

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.)

@DarkNami DarkNami added the bug Something isn't working label Dec 14, 2022
@github-actions
Copy link

Hi! 👋
Thanks for your issue. You are helping to improve Bootstrap 5 toggle.

@palcarazm
Copy link
Owner

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.

@DarkNami
Copy link
Author

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. 🤔

@palcarazm
Copy link
Owner

Okay, don't worry. I will merge your changes and put you as co-author of the commit.

@DarkNami
Copy link
Author

Thank you. 👍

@palcarazm palcarazm self-assigned this Dec 14, 2022
palcarazm added a commit that referenced this issue Dec 14, 2022
@palcarazm palcarazm linked a pull request Dec 14, 2022 that will close this issue
palcarazm added a commit that referenced this issue Dec 14, 2022
fix: Remove attribute for if there is no ID (#80)
@palcarazm
Copy link
Owner

Done! It will be released in the next patch.

@DarkNami
Copy link
Author

I have tested it, warning is stopped.
Thank you.

palcarazm added a commit that referenced this issue Dec 19, 2022
palcarazm added a commit that referenced this issue Dec 19, 2022
fix: Remove attribute for if there is no ID Fixes (#80)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants