@orangelogic/orange-dam-content-browser-sdk 2.2.8-beta-1 → 2.2.8
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/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Focus-trap-aware popup anchoring (ticket 29KEV1).
|
|
3
|
-
*
|
|
4
|
-
* When the Content Browser SDK opens in popup mode (no `containerId`), its UI is
|
|
5
|
-
* appended to `document.body`, outside any host-page modal. If the host page has
|
|
6
|
-
* an active modal with a focus trap — Drupal's jQuery UI Dialog, Bootstrap,
|
|
7
|
-
* react-focus-lock / focus-trap, a native `<dialog>` opened with `showModal()`,
|
|
8
|
-
* etc. — that trap forces focus back into the modal (or makes the rest of the
|
|
9
|
-
* page `inert`) whenever focus lands on the CBSDK search field, making it
|
|
10
|
-
* impossible to type.
|
|
11
|
-
*
|
|
12
|
-
* Every containment-based focus trap allows focus for elements that are DOM
|
|
13
|
-
* descendants of its container (jQuery UI checks `closest('.ui-dialog')`,
|
|
14
|
-
* focus-trap checks `container.contains(target)`, native modal dialogs don't
|
|
15
|
-
* mark their own subtree `inert`, ...). So the robust, framework-agnostic fix is
|
|
16
|
-
* to mount the CBSDK popup *inside* the active modal container instead of
|
|
17
|
-
* `document.body`.
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* Finds the active host-page modal that CBSDK should mount inside so its inputs
|
|
21
|
-
* remain focusable. Returns `null` when there is no modal to anchor to (the
|
|
22
|
-
* normal case — CBSDK then mounts to `document.body` as before), or when
|
|
23
|
-
* anchoring would clip CBSDK's fixed overlay.
|
|
24
|
-
*/
|
|
25
|
-
export declare function findFocusContainmentHost(doc?: Document): HTMLElement | null;
|