@movmo_app/react-common 0.11.4 → 0.11.6

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.
package/dist/index.d.ts CHANGED
@@ -259,6 +259,20 @@ export declare interface PhoneInputProps {
259
259
  autoComplete?: string;
260
260
  }
261
261
 
262
+ /**
263
+ * Programmatically focuses `el`, swallowing only the cross-origin `SecurityError` that
264
+ * browsers throw when focus would cross a cross-origin iframe boundary. Any other error is
265
+ * unexpected and rethrown, so real bugs aren't hidden.
266
+ *
267
+ * Express Checkout embeds these components (SignInModal / OTPModal) inside flights-ui,
268
+ * which is iframed cross-site on airline-partner pages. In that context a bare
269
+ * `element.focus()` raises "Blocked a frame with origin … from accessing a frame …"
270
+ * (the MOVMO-437 `OTPModal.tsx` trace). Focus is a non-critical UX nicety, so we degrade
271
+ * gracefully on that specific rejection rather than let it break the render/commit. A
272
+ * no-op when `el` is absent.
273
+ */
274
+ export declare function safeFocus(el: HTMLElement | null | undefined): void;
275
+
262
276
  export declare const SearchInput: React_2.ForwardRefExoticComponent<SearchInputProps & React_2.RefAttributes<HTMLInputElement>>;
263
277
 
264
278
  declare interface SearchInputProps extends React_2.InputHTMLAttributes<HTMLInputElement> {