diff --git a/app/assets/stylesheets/lexxy-content.css b/app/assets/stylesheets/lexxy-content.css
index 6a06d9539..bc8dc0fd1 100644
--- a/app/assets/stylesheets/lexxy-content.css
+++ b/app/assets/stylesheets/lexxy-content.css
@@ -478,6 +478,17 @@
position: relative;
white-space: normal;
+ /* Gecko drops the whole selection when a drag crosses a contenteditable="false"
+ island unless it is selectable as a single unit. Editor-only: the rendered
+ view has no contenteditable and must keep normal text selection. */
+ lexxy-editor & {
+ -webkit-user-select: all;
+
+ @supports (user-select: all) {
+ user-select: all;
+ }
+ }
+
img {
block-size: var(--lexxy-attachment-image-size);
border-radius: 50%;
diff --git a/test/browser/tests/prompts/selection_across_mention.test.js b/test/browser/tests/prompts/selection_across_mention.test.js
new file mode 100644
index 000000000..c6aea6a7d
--- /dev/null
+++ b/test/browser/tests/prompts/selection_across_mention.test.js
@@ -0,0 +1,47 @@
+import { test } from "../../test_helper.js"
+import { expect } from "@playwright/test"
+
+const MENTION = '
Hello ${MENTION} world
`) + await editor.flush() + + await dragAcrossParagraph(page, editor) + + const selection = await selectedText(page) + expect(selection).toContain("Hello") + expect(selection).toContain("world") + expect(selection).toContain("Zacharias") + }) + + test("dragging across plain text still selects it", async ({ page, editor }) => { + await editor.setValue("Hello there world
") + await editor.flush() + + await dragAcrossParagraph(page, editor) + + expect(await selectedText(page)).toContain("Hello there world") + }) +})