Page MenuHomePhabricator

Copying (Ctrl+C) with no text selected shouldn't remove contents of clipboard
Closed, ResolvedPublic1 Estimated Story Points

Description

Currently it seems that trying to copy (Ctrl+C) when no text is selected in the editor results in the contents of the clipboard getting "emptied" i.e., when I have some content (text) in my clipboard and I press "Ctrl+C" (sometimes accidentally) with no text selected in the editor, the content in the clipboard gets lost. This some times causes frustration.

This doesn't seem to be the case with the VisualEditor.

Steps to reproduce

  1. Edit an article using the visual text editor.
  2. Hit "Ctrl+C" or it's equivalent without selecting contents

Expected results
Contents of the clipboard remain as it is.

Actual results
The contents of the clipboard get emptied,

Event Timeline

Kaartic created this task.Nov 7 2017, 12:47 PM
Restricted Application added a project: VisualEditor. · View Herald TranscriptNov 7 2017, 12:47 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 389724 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Do nothing if selection is empty on wikitext surface

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

Change 389724 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] ce.MWWikitextSurface#onCopy: Do nothing if selection is empty

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

Jdforrester-WMF closed this task as Resolved.Nov 7 2017, 6:53 PM
Jdforrester-WMF assigned this task to Esanders.
Jdforrester-WMF set the point value for this task to 1.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptNov 7 2017, 6:53 PM