Page MenuHomePhabricator

while editing in VisualEditor, right-clicking a table in Chrome doesn't give "Copy" and "Paste" commands
Closed, ResolvedPublic

Description

To reproduce, edit a page in Visual editor, create a table, select some cells, and right-click them.

  • Result in Firefox: A "Copy" command is shown in the context menu. Clicking it copies the cells to the clipboard, and they can be pasted.
  • Result in Chrome: There is no "Copy" command in the context menu.

The keyboard shortcut Ctrl-C/Cmd-C works as expected in both browsers, so the copying action is definitely possible, but in Google Chrome it is not accessible to people who do it using right-clicking. I practically always use the keyboard shortcuts, but I see a lot of people who prefer copying using right-clicking, as inefficient as it may sound, so this should be possible.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

As far as I can tell, this is actually triggered by your right-click being on an empty cell. If the cell doesn't contain any text, Chrome won't think there's anything to copy.

On text:

pasted_file (312×968 px, 63 KB)

On empty:

pasted_file (340×1 px, 66 KB)

Note that you can reproduce the same issue without having to select multiple cells. (Though it's more obviously-wrong when multiple cells are selected.)

Change 503750 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] ve.ce.TableNode: Fix right-click to copy code

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

Change 503750 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] ve.ce.TableNode: Fix right-click to copy code

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

Change 504075 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (33847a3ec)

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

Change 504075 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (33847a3ec)

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