jackocnr / intl-tel-input

A JavaScript plugin for entering and validating international telephone numbers. React and Vue components also included.
https://intl-tel-input.com
MIT License
7.64k stars 1.95k forks source link

No keyboard nav or typing names when used with Sweetalert2 #1030

Closed NickSutton closed 4 years ago

NickSutton commented 4 years ago

Steps to reproduce

  1. Create page with a modal using https://sweetalert2.github.io/
  2. Install intl-tel-input as described
  3. Attempt navigation of country list by keyboard (typing the country name) or arrow keys.

Expected behaviour

Country list should react to the keyboard.

Actual behaviour

Nothing happens.

Initialisation options

autoHideDialCode: false, preferredCountries: responderCountryCodes, //defined array separateDialCode: true, utilsScript: "assets/InternationalTelNew/build/js/utils.js"

NickSutton commented 4 years ago

Cancel last! I found that Sweetalert needs 'stopKeydownPropagation: false' to allow keyboard entry through, in case anyone comes up against this in the future.