flowbite icon indicating copy to clipboard operation
flowbite copied to clipboard

Phone input country code no working

Open spaquet opened this issue 1 year ago • 5 comments

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 avatar Jul 31 '24 20:07 spaquet

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

davidmir avatar Aug 06 '24 14:08 davidmir

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

spaquet avatar Aug 06 '24 15:08 spaquet

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

Helixons avatar Oct 15 '24 15:10 Helixons

I have fixed the issue https://github.com/themesberg/flowbite/pull/984

Helixons avatar Oct 18 '24 13:10 Helixons

Hi @zoltanszogyenyi, I've fixed the phone input country code bug, enabling selection, proper closing. I also removed the duplicate Germany entry. Please review and merge https://github.com/themesberg/flowbite/pull/984. Thank you!

Helixons avatar Oct 18 '24 13:10 Helixons