intl-tel-input 29.4.0 → 29.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3442,7 +3442,7 @@ var UI = class {
3442
3442
  this.#detachedCountrySelectorEl.remove();
3443
3443
  this.#detachedCountrySelectorEl.style.top = "";
3444
3444
  this.#detachedCountrySelectorEl.style.bottom = "";
3445
- this.#detachedCountrySelectorEl.style.height = "";
3445
+ this.#detachedCountrySelectorEl.style.removeProperty("--iti-virtual-keyboard-height");
3446
3446
  this.#detachedCountrySelectorEl.style.paddingLeft = "";
3447
3447
  this.#detachedCountrySelectorEl.style.paddingRight = "";
3448
3448
  } else {
@@ -3501,14 +3501,16 @@ var UI = class {
3501
3501
  this.telInputEl.style.anchorName = existing && existing !== "none" ? `${existing}, ${anchorName}` : anchorName;
3502
3502
  this.#detachedCountrySelectorEl.style.positionAnchor = anchorName;
3503
3503
  }
3504
- // Adjust the fullscreen popup dimensions to match the visual viewport,
3505
- // so it stays above the virtual keyboard on mobile devices.
3504
+ // Tell the CSS how much of the fullscreen popup is covered by the virtual keyboard, so it can fit the
3505
+ // country selector above it, while the popup itself (the dark backdrop) stays fullscreen behind the keyboard.
3506
3506
  #adjustFullscreenPopupToViewport() {
3507
3507
  const vv = window.visualViewport;
3508
- if (!vv || !this.#detachedCountrySelectorEl) {
3508
+ const popup = this.#detachedCountrySelectorEl;
3509
+ if (!vv || !popup) {
3509
3510
  return;
3510
3511
  }
3511
- this.#detachedCountrySelectorEl.style.height = `${vv.height}px`;
3512
+ const virtualKeyboardHeight = Math.max(0, popup.offsetHeight - vv.height);
3513
+ popup.style.setProperty("--iti-virtual-keyboard-height", `${virtualKeyboardHeight}px`);
3512
3514
  }
3513
3515
  // UI: Whether the country selector is currently open (visible).
3514
3516
  isCountrySelectorOpen() {
@@ -4978,7 +4980,7 @@ var intlTelInput = Object.assign(
4978
4980
  attachUtils,
4979
4981
  startedLoadingUtils: false,
4980
4982
  startedLoadingAutoCountry: false,
4981
- version: "29.4.0",
4983
+ version: "29.4.1",
4982
4984
  NUMBER_FORMAT,
4983
4985
  NUMBER_TYPE,
4984
4986
  VALIDATION_ERROR,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intl-tel-input",
3
- "version": "29.4.0",
3
+ "version": "29.4.1",
4
4
  "description": "A JavaScript library for entering, formatting, and validating international telephone numbers",
5
5
  "type": "module",
6
6
  "license": "MIT",