Page MenuHomePhabricator

Mobile: Provide a way to copy non-native selections (e.g. FocusableNodes or table selections)
Closed, DuplicatePublic


Without a keyboard the only way to copy on mobile is using the text selection context menu, but some VE selections aren't text selections.

It is possible that we won't be able to write to the external clipboard, due to security restrictions, but we could still enable local copy/paste.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 20 2018, 12:33 PM
Esanders triaged this task as Low priority.Aug 20 2018, 12:34 PM

MobileFrontend or VisualEditor-MediaWiki-Mobile or which code project is this about?

Restricted Application added a project: VisualEditor. · View Herald TranscriptAug 24 2018, 1:01 PM
Deskana moved this task from To Triage to Up next on the VisualEditor board.Aug 28 2018, 6:50 PM
Deskana raised the priority of this task from Low to Medium.Aug 29 2018, 3:28 PM
Esanders added a comment.EditedAug 31 2018, 11:13 AM

It may actually be the case that with the browsers than we want to support, we can actually write to the clipboard in response to a user event using document.execCommand.

It looks like support was added in iOS 11 for execCommand, although it does require a native selection to be present, and therefor the virtual keyboard to be visible. Testing the following sequence:

  1. Create selection
  2. Call execCommand
  3. Remove selection

The keyboard quickly shows and then hides, but this may be better than not providing copy support at all.

Android seems to work fine, although I haven't tested old versions.