Case ce-0569 · Scenario scenario-firefox-drag-drop-issues

Drag and drop of text fails to move content

OS: Linux Ubuntu 24.04 Device: Desktop Any Browser: Firefox 132.0 Keyboard: US QWERTY Status: confirmed
drag-drop firefox ux reliability

Phenomenon

A regression or long-standing divergence in Firefox (reported active in Lexical Playground, Nov 2025) prevents the default “drag-to-move” behavior within contenteditable. While Chromium and WebKit allow users to reposition text blocks intuitively via drag-and-drop, Firefox often fails to dispatch the necessary drop events or internal DOM updates required to teleport the text.

Reproduction Steps

  1. Open a contenteditable editor in Firefox (v130+).
  2. Type two sentences.
  3. Select the first sentence with the mouse.
  4. Click and hold the selection, then drag it to the end of the second sentence.
  5. Release the mouse button.

Observed Behavior

  1. dragstart: Fires correctly.
  2. Ghost Image: Appears and follows the mouse.
  3. drop: Either does not fire at the target, or fires but the browser’s default action (moving the text) is not executed.
  4. Result: The selection remains at the source, and nothing is moved. No beforeinput with inputType: "deleteByDrag" or "insertFromDrop" is triggered.

Expected Behavior

The browser should automatically handle the deletion of the source fragment and the insertion at the destination, triggering beforeinput events for both operations.

Impact

  • Severed UX: Users who rely on mouse-based editing (common in elderly users or specific workflows) find the editor “broken.”
  • Framework Incompatibility: Modern frameworks (Lexical, Slate) expect the browser to manage the basic move operation or provide a valid DataTransfer object during the drop.

Browser Comparison

  • Firefox 130-132: Reported failure in move operations.
  • Chrome / Edge: Works natively and smoothly.
  • Safari: Works correctly on macOS.

References & Solutions

Mitigation: Manual Drag-Drop Handler

If the browser fails to move the text, you must implement a complete drag-and-drop manager using the DataTransfer API.

element.addEventListener('dragstart', (e) => {
    e.dataTransfer.setData('text/plain', window.getSelection().toString());
    e.dataTransfer.effectAllowed = 'move';
});

element.addEventListener('drop', (e) => {
    e.preventDefault();
    const data = e.dataTransfer.getData('text/plain');
    const range = document.caretRangeFromPoint(e.clientX, e.clientY);
    
    // Manually delete source and insert at range
    // NOTE: This usually requires a complex transaction logic in frameworks
    dispatchMoveTransaction(sourceRange, range, data);
});
Step 1: Text Selection
[Selected Text] and other content.
User selects a portion of text to move.
Step 2: Dragging
Selected Text and [Drop Target] other content.
User drags the selection to a new position. Firefox shows the drag ghost but rarely triggers the internal move.
vs
✅ Expected
and [Selected Text] other content.
Expected: The text is removed from the source and inserted at the destination.

Browser compatibility matrix

This matrix shows which browser and OS combinations have documented cases for this scenario. The current case is highlighted. Click on a cell to view other cases.

Current case
Confirmed
Draft
No case documented

All variants (detailed table)

Complete list of all cases for this scenario with full environment details.

Case OS Device Browser Keyboard Status
ce-0310-firefox-nested-span-drag-en Any Any Desktop Any Firefox 90+ Any draft
ce-0554-firefox-drag-drop-textarea-en Any Any Desktop Any Firefox 90+ Any draft
ce-0569 Linux Ubuntu 24.04 Desktop Any Firefox 132.0 US QWERTY confirmed

Playground for this case

Use the reported environment as a reference and record what happens in your environment while interacting with the editable area.

Reported environment
OS: Linux Ubuntu 24.04
Device: Desktop Any
Browser: Firefox 132.0
Keyboard: US QWERTY
Your environment
Sample HTML:
Event log
Use this log together with the case description when filing or updating an issue.
0 events
Interact with the editable area to see events here.

Comments & Discussion

Have questions, suggestions, or want to share your experience? Join the discussion below.