Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div class="w-[20rem] max-w-[calc(100vw-1rem)] rounded-md bg-role-surface p-2">
<div class="min-w-[20rem] rounded-md bg-role-surface p-2">
<div class="flex items-center justify-between gap-2 px-1 py-1">
<span class="text-sm text-role-on-surface-variant" data-testid="editor-search-result-counter">
{{ resultPositionLabel }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
class="text-editor-toolbar-dropdown w-auto min-w-40"
padding-size="small"
:close-on-click="item.menuCloseOnClick ?? true"
:enforce-drop-on-mobile="item.menuEnforceDropOnMobile ?? false"
>
<component
:is="item.menuComponent"
Expand Down Expand Up @@ -103,6 +104,7 @@
mode="hover"
class="text-editor-toolbar-dropdown-nested w-fit"
:close-on-click="child.menuCloseOnClick ?? true"
:enforce-drop-on-mobile="item.menuEnforceDropOnMobile ?? false"
position="right-start"
teleport="body"
>
Expand Down
2 changes: 2 additions & 0 deletions packages/web-pkg/src/editor/composables/useEditorActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export interface EditorAction {
showInToolbar?: boolean
showInSlashCommands?: boolean
menuCloseOnClick?: boolean
menuEnforceDropOnMobile?: boolean
menuComponent?: Component
menuComponentAttrs?: (editor: Editor, closeMenu: () => void) => Record<string, unknown>

Expand Down Expand Up @@ -775,6 +776,7 @@ export function useEditorActions(state: TextEditorState) {
})
},
menuCloseOnClick: false,
menuEnforceDropOnMobile: true,
menuComponent: markRaw(OcEmojiPicker),
menuComponentAttrs: (editor, closeMenu) => ({
theme: unref(currentTheme)?.isDark ? 'dark' : 'light',
Expand Down