Page MenuHomePhabricator

Content nodes are lost when bolded in VE
Closed, ResolvedPublic

Description

Behavior

  1. Open VE in any context (e.g. Reply Tool's visual mode, Flow's Visual editing mode or the full page visual editor)
  2. Insert any content node in the middle of a paragraph (it must have some text on both sides) – we initially noticed this with Flow and DiscussionTools mentions, but it also affects e.g. references, HTML comments, etc.
  3. Select the entire paragraph, with the content node in the middle
  4. Press + B

Actual

  1. ❗️Notice the content node you highlighted in "Step 3" has been deleted, the rest of the text is bolded
  2. After pressing Enter, two snowmen ☃ appear

This video demonstrates this issue: https://www.youtube.com/watch?v=VFc7_8AP0dU

Expected

  1. ✅Notice the content node is bolded along with the rest of the text

Environment

  • Platform: Desktop
  • Browser: Chrome

Done

  • "Expected" behavior is implemented

Event Timeline

matmarex renamed this task from Text is lost when bolded in VE to Content nodes are lost when bolded in VE .Sep 23 2020, 5:17 PM
matmarex updated the task description. (Show Details)

Change 629392 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Revert "ve.ce.Surface: Debounce onModelDocumentUpdate"

https://gerrit.wikimedia.org/r/629392

ppelberg updated the task description. (Show Details)

Change 629392 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Revert "ve.ce.Surface: Debounce onModelDocumentUpdate"

https://gerrit.wikimedia.org/r/629392

Change 629450 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (0a5e284c7)

https://gerrit.wikimedia.org/r/629450

Change 629450 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (0a5e284c7)

https://gerrit.wikimedia.org/r/629450

Esanders added a project: Regression.

I think this is the same bug: pressing CTRL + I (for italics) produce the same bug.

Plus, for text-only nodes, pressing CTRL+I/B make the cursor come back to paragraph origin.