diff --git a/packages/web-pkg/src/components/ContextActions/ActionMenuDropItem.vue b/packages/web-pkg/src/components/ContextActions/ActionMenuDropItem.vue index ed8b30fac1..ba1adfddc3 100644 --- a/packages/web-pkg/src/components/ContextActions/ActionMenuDropItem.vue +++ b/packages/web-pkg/src/components/ContextActions/ActionMenuDropItem.vue @@ -23,7 +23,7 @@ :is-nested-element="true" :nested-parent-ref="parentDropRef" mode="hover" - class="w-auto oc-files-context-action-drop" + class="w-3xs oc-files-context-action-drop" padding-size="small" position="auto-start" close-on-click diff --git a/packages/web-pkg/src/components/FilesList/ResourceTiles.vue b/packages/web-pkg/src/components/FilesList/ResourceTiles.vue index 24c462b209..6bb2a178ce 100644 --- a/packages/web-pkg/src/components/FilesList/ResourceTiles.vue +++ b/packages/web-pkg/src/components/FilesList/ResourceTiles.vue @@ -188,6 +188,7 @@ import { import { useInterceptModifierClick } from '../../composables/keyboardActions' import { SizeType } from '@opencloud-eu/design-system/helpers' import ResourceStatusIndicators from './ResourceStatusIndicators.vue' +import { useIsMobile } from '@opencloud-eu/design-system/composables' type ResourceTileRef = ComponentPublicInstance type ContextMenuQuickActionRef = ComponentPublicInstance @@ -237,6 +238,7 @@ const { getDefaultAction } = useFileActions() const { getMatchingSpace } = useGetMatchingSpace() const { interceptModifierClick } = useInterceptModifierClick() const { canBeOpenedWithSecureView } = useCanBeOpenedWithSecureView() +const { isMobile } = useIsMobile() const { isEnabled: isEmbedModeEnabled, fileTypes: embedModeFileTypes, @@ -439,6 +441,15 @@ const showContextMenu = ( if (!isResourceSelected(item)) { emitSelect([item.id]) } + + if (unref(isMobile)) { + // we can't use displayPositionedDropdown() on mobile because we need to open the bottom drawer. + // this can be triggered by clicking the context menu button of the current row. + const el = document.getElementById(`context-menu-trigger-${item.getDomSelector()}`) + el?.click() + return + } + displayPositionedDropdown(drop._tippy, event, reference) } diff --git a/packages/web-pkg/tests/unit/components/ContextActions/__snapshots__/ActionMenuDropItem.spec.ts.snap b/packages/web-pkg/tests/unit/components/ContextActions/__snapshots__/ActionMenuDropItem.spec.ts.snap index 23131b0596..749e308bba 100644 --- a/packages/web-pkg/tests/unit/components/ContextActions/__snapshots__/ActionMenuDropItem.spec.ts.snap +++ b/packages/web-pkg/tests/unit/components/ContextActions/__snapshots__/ActionMenuDropItem.spec.ts.snap @@ -21,7 +21,7 @@ exports[`ActionMenuDropItem component > renders drop menu with actions 1`] = ` return svg; }" aria-hidden="true" focusable="false" class="size-4"> -
+
diff --git a/packages/web-pkg/tests/unit/components/ContextActions/__snapshots__/ContextActionMenu.spec.ts.snap b/packages/web-pkg/tests/unit/components/ContextActions/__snapshots__/ContextActionMenu.spec.ts.snap index 8338759691..af6b408e58 100644 --- a/packages/web-pkg/tests/unit/components/ContextActions/__snapshots__/ContextActionMenu.spec.ts.snap +++ b/packages/web-pkg/tests/unit/components/ContextActions/__snapshots__/ContextActionMenu.spec.ts.snap @@ -30,7 +30,7 @@ exports[`ContextActionMenu component > renders the menu with drop menu items 1`] return svg; }" aria-hidden="true" focusable="false" class="size-4"> -
+
@@ -81,7 +81,7 @@ exports[`ContextActionMenu component > renders the menu with drop menu items 1`] return svg; }" aria-hidden="true" focusable="false" class="size-4"> -
+
@@ -124,7 +124,7 @@ exports[`ContextActionMenu component > renders the menu with drop menu items 1`] return svg; }" aria-hidden="true" focusable="false" class="size-4"> -
+