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

Phone input country code no working #939

Open
spaquet opened this issue Jul 31, 2024 · 3 comments
Open

Phone input country code no working #939

spaquet opened this issue Jul 31, 2024 · 3 comments

Comments

@spaquet
Copy link

spaquet commented Jul 31, 2024

Describe the bug
the phone input country code feature does not work as it does not let the user selects a country code and remains opened with no way to close it.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://flowbite.com/docs/forms/phone-input/#phone-input-country-code
  2. Click on any phone country code
  3. Nothing happens
  4. The dropdown does not close and the phone country code does not change. Once opened, this dropdown does not close or let the user select the proper country code.

Expected behavior
when a user selects a country code from the list the dropdown should close and the country code should be selected
when a user clicks outside of the list the dropdown should close and the country code should remain the same

Desktop (please complete the following information):

  • OS: OS X (but I wouldn't be surprised if this is also the case on Windows and Linux)
  • Browser safari, chrome, firefox
  • Latest versions for the 3 of them
@spaquet spaquet changed the title Phone input country code no working on Safari Phone input country code no working Jul 31, 2024
@davidmir
Copy link

davidmir commented Aug 6, 2024

+1 for this issue, I'm currently handling this using Javascript

@spaquet
Copy link
Author

spaquet commented Aug 6, 2024

@davidmir I eventually developed the code as a Rails Stimulus controller and consider this as a template more than a component you can use out of the box.

@Helixons
Copy link

It seems like that the JavaScript event listeners aren't set up right, I might have a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants