Page MenuHomePhabricator

Pasting into text styling on VisualEditor turns it into a cloud character
Open, Needs TriagePublicBUG REPORT

Description

What is the problem?

If I copy and paste something into bold, italic, etc. in VisualEditor, whatever I paste is turned into the character (cloud).

I have seen this happen with bold, italic, code, underline, big, small and with a wide variety of pasted content (except URLs).

Steps to reproduce problem
  1. Copy foo into your clipboard
  2. Open an empty VE instance (MW or standalone)
  3. Press ctrl+b or ctrl+i, or select bold/italic from the text dropdown
  4. Paste with ctrl+v

Expected behaviour: You see foo in bold.
Observed behaviour: You see .

Environment

Browser: Firefox 115, Chromium 120.
Wiki(s): https://wishlist-test.toolforge.org

Screenshots

Example trying to paste "foo" as bold: F55912885

Event Timeline

CommTech should not work on this, as it is a bug in VE.

Since this is a valid bug report, I reopened it but removed the CommTech tag, feel free to unsubscribe.

The issue here is cleanupUnicorns (which are inserted when you press ctrl+b). This happens in the middle of the paste cycle, stealing focus from the ClipboardHandler, and so not allowing content to be pasted into it.

Change #1117151 had a related patch set uploaded (by Esanders; author: Esanders):

[VisualEditor/VisualEditor@master] ve.ce.Surface: Don't modify model selection while pasting

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

This is a semi-regression from https://gerrit.wikimedia.org/r/c/VisualEditor/VisualEditor/+/812093, as before that patch the text would paste plain (not respecting the insertion annotation).

Change #1117151 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] ve.ce.Surface: Don't modify model selection while pasting

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

Change #1121610 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (65e885e43)

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

Change #1121610 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (65e885e43)

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