(selectors);
+ return [
+ focusableElements.item(0), //
+ focusableElements.item(focusableElements.length - 1),
+ ];
+ };
+
+ const { destroy: destroyShortcuts } = shortcuts(container, [
+ {
+ ignoreInputFields: false,
+ preventDefault: false,
+ shortcut: { key: 'Tab' },
+ onShortcut: (event) => {
+ const [firstElement, lastElement] = getFocusableElements();
+ if (document.activeElement === lastElement) {
+ event.preventDefault();
+ firstElement?.focus();
+ }
+ },
+ },
+ {
+ ignoreInputFields: false,
+ preventDefault: false,
+ shortcut: { key: 'Tab', shift: true },
+ onShortcut: (event) => {
+ const [firstElement, lastElement] = getFocusableElements();
+ if (document.activeElement === firstElement) {
+ event.preventDefault();
+ lastElement?.focus();
+ }
+ },
+ },
+ ]);
+
+ return {
+ destroy() {
+ destroyShortcuts?.();
+ if (triggerElement instanceof HTMLElement) {
+ triggerElement.focus();
+ }
+ },
+ };
+}
diff --git a/web/src/lib/components/asset-viewer/asset-viewer.svelte b/web/src/lib/components/asset-viewer/asset-viewer.svelte
index ce4430edf1..f216d73382 100644
--- a/web/src/lib/components/asset-viewer/asset-viewer.svelte
+++ b/web/src/lib/components/asset-viewer/asset-viewer.svelte
@@ -1,7 +1,6 @@
-
- {
- trapFocus('forward', event);
- },
- preventDefault: false,
- },
- {
- ignoreInputFields: false,
- shortcut: { key: 'Tab', shift: true },
- onShortcut: (event) => {
- trapFocus('backward', event);
- },
- preventDefault: false,
- },
- ]}
->
-
-
diff --git a/web/src/lib/components/shared-components/full-screen-modal.svelte b/web/src/lib/components/shared-components/full-screen-modal.svelte
index d0d629ee4d..bc1253a546 100644
--- a/web/src/lib/components/shared-components/full-screen-modal.svelte
+++ b/web/src/lib/components/shared-components/full-screen-modal.svelte
@@ -1,7 +1,7 @@
-
+
-
-
-
-
-
-
+
+
-
+
+
+
+
+
{#if isShowSelectAvatar}