From ffea278be148b572276290dca99fbf692ea93e9a Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 19 Jun 2026 20:38:43 +0200 Subject: [PATCH] fix(editor): render floating popups inside the task dialog (Kanban popup) The Kanban task detail opens as a native via showModal(), which paints in the browser top-layer. Floating UI appended to document.body (or teleported to ) then renders behind the dialog regardless of z-index, matching the bug class of #2940 / #1746 / #1899 / #1929. - Emoji autocomplete popup: append to getPopupContainer(editor) (the open dialog ancestor, else body), the same helper the slash menu and mentions already use. Also switch its unmount to popupElement.remove() so it works no matter which container it was appended to. - Attachment dropzone overlay: teleport into the topmost open dialog.modal-dialog instead of always , mirroring Notification.vue, so the drag-and-drop hint is visible while a task detail dialog is open. --- .../input/editor/emoji/emojiSuggestion.ts | 5 +-- .../components/tasks/partials/Attachments.vue | 34 +++++++++++++++++-- 2 files changed, 34 insertions(+), 5 deletions(-) diff --git a/frontend/src/components/input/editor/emoji/emojiSuggestion.ts b/frontend/src/components/input/editor/emoji/emojiSuggestion.ts index 22dad82b2..b9fb7c961 100644 --- a/frontend/src/components/input/editor/emoji/emojiSuggestion.ts +++ b/frontend/src/components/input/editor/emoji/emojiSuggestion.ts @@ -5,6 +5,7 @@ import {PluginKey, type EditorState} from '@tiptap/pm/state' import EmojiList from './EmojiList.vue' import {loadEmojis, filterEmojis, type EmojiEntry} from './emojiData' +import {getPopupContainer} from '../popupContainer' export const EmojiSuggestionPluginKey = new PluginKey('emojiSuggestion') @@ -78,7 +79,7 @@ export default function emojiSuggestionSetup() { popupElement.style.left = '0' popupElement.style.zIndex = '4700' popupElement.appendChild(component.element!) - document.body.appendChild(popupElement) + getPopupContainer(props.editor).appendChild(popupElement) const rect = props.clientRect() if (!rect) { @@ -108,7 +109,7 @@ export default function emojiSuggestionSetup() { cleanupFloating = null } if (popupElement) { - document.body.removeChild(popupElement) + popupElement.remove() popupElement = null } component?.destroy() diff --git a/frontend/src/components/tasks/partials/Attachments.vue b/frontend/src/components/tasks/partials/Attachments.vue index 96e965153..322fddaa3 100644 --- a/frontend/src/components/tasks/partials/Attachments.vue +++ b/frontend/src/components/tasks/partials/Attachments.vue @@ -123,7 +123,7 @@ - +