Page MenuHomePhabricator

VisualEditor: Cut all text, re-paste it: broken editor
Closed, ResolvedPublic

Description

Steps to reproduce:

  1. Go to http://www.mediawiki.org/wiki/Special:VisualEditorSandbox
  2. Press CTRL-A (or select all text with the mouse)
  3. Press CTRL-X to cut all this text. The text disappears.
  4. Press CTRL-V to reinsert the text.

PROBLEM1: Text is not reinserted, the page stays blank.
PROBLEM2: One can enter text, but not new lines. Pressing "Enter" does not have any effect.

Tested on Ubuntu 2012.04, Firefox 13.0.1


Version: unspecified
Severity: major

Details

Reference
bz37980

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:29 AM
bzimport set Reference to bz37980.

On Ubuntu 2012.04, Chromium 18.0.1025.151: Only PROBLEM1 occurs, PROBLEM2 does not occur.

Confirm problem 1 (but not 2) on Chrome 19/Mac and both problems on Firefox 13/Mac.

orbit wrote:

This looks like a bug in fixupInsertion. When the entire contents is cut, only paragraph and /paragraph are in the documentModel. Pasting more than 2 paragraphs will error.

Steps to reproduce:

  1. Create a document with 3 simple paragraphs.
  2. Ctl-A
  3. Ctl-X
  4. Ctl-V

(In reply to comment #4)

This looks like a bug in fixupInsertion. When the entire contents is cut, only
paragraph and /paragraph are in the documentModel. Pasting more than 2
paragraphs will error.

This fixupInsertion issue is fixed in https://gerrit.wikimedia.org/r/14398 . This fixes problem #1, which occurred in all browsers. Problem #2 is a Firefox-specific selection issue, so I'm filing a separate bug for that and closing this one as fixed.

Problem #2 is a Firefox-specific selection issue, so I'm filing a separate bug for that and closing this one as fixed.

Roan, could you please tell us the identifier of the new bug report you created?

(In reply to comment #6)

Problem #2 is a Firefox-specific selection issue, so I'm filing a separate bug for that and closing this one as fixed.

Roan, could you please tell us the identifier of the new bug report you
created?

Sorry, meant to do that but forgot. I filed bug 38207 for it and later found it was a duplicate of bug 38037.