@ajuarezso/sui-design-system 0.14.2 → 0.14.3

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.
@@ -9872,10 +9872,15 @@ class SuiInput {
9872
9872
  * hay teclado abierto, por eso escuchamos también `touchstart` (nativo iOS)
9873
9873
  * y `mousedown` (web fallback). Cualquiera de los tres dispara el blur.
9874
9874
  *
9875
- * Usamos `document.activeElement.blur()` cuando ese elemento está dentro
9876
- * del host — eso garantiza que blur surta efecto en el input que realmente
9877
- * tiene el focus, no en una referencia stale. Fallback a inputEl por si
9878
- * activeElement no está dentro del host (edge case).
9875
+ * Solo hace blur cuando el elemento enfocado vive DENTRO de este host: si el
9876
+ * foco está en otro lado (otro input, un textarea, nada), acá no hay teclado
9877
+ * que cerrar y tocarlo es un bug. El listener es a nivel `document`, así que
9878
+ * cada instancia de la página recibe todos los taps: con un blur incondicional
9879
+ * de `inputEl`, tocar el texto de un input cerraba el teclado porque los OTROS
9880
+ * sui-input de la pantalla hacían blur de los suyos —y en iOS un blur con el
9881
+ * teclado abierto lo cierra aunque el elemento no tenga el foco. Se veía en
9882
+ * cualquier formulario con más de un campo y no en el buscador del home, que
9883
+ * tiene uno solo.
9879
9884
  */
9880
9885
  onDocumentTap(event) {
9881
9886
  if (!this.closeOnOutsideClick())
@@ -9885,12 +9890,8 @@ class SuiInput {
9885
9890
  if (!target || host.contains(target))
9886
9891
  return;
9887
9892
  const active = document.activeElement;
9888
- if (active && host.contains(active)) {
9893
+ if (active && host.contains(active))
9889
9894
  active.blur();
9890
- }
9891
- else {
9892
- this.inputEl?.nativeElement.blur();
9893
- }
9894
9895
  }
9895
9896
  _disabledByForm = signal(false, ...(ngDevMode ? [{ debugName: "_disabledByForm" }] : /* istanbul ignore next */ []));
9896
9897
  isDisabled = computed(() => this.disabled() || this._disabledByForm(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));