Users can't see the flag of the default country after changing country

Created on 13 May 2024, 7 months ago
Updated 27 May 2024, 7 months ago

Problem/Motivation

I have created a webfrom with the phone field that has the next available countries for France, Italy, and Germany; German is the default one. When I open it and change the country to Italy (for example) I can't see the flag of Germany anymore as the JS prevents showing the German flag.

          $input.change((event) => {
            const newVal = $(event.target).val();
            if (val !== newVal) {
              setCountry(newVal);
            }
          });

Steps to reproduce

  1. Create a webform with a phone field with a flag. Set France, Italy, and Germany as available countries, and German is the default one (for example)
  2. Go to the webform page and change phone country to Italy
  3. Change phone country to German back
  4. You won't see the German flag near the phone field anymore even though it is selected in the select list at the moment

This issue also can be reproduced by adding a phone field to any entity type

πŸ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine chizh273

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024