Page MenuHomePhabricator

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

Description

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

Deskana raised the priority of this task from Low to Medium.Aug 29 2018, 3:28 PM

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.