yoast-components icon indicating copy to clipboard operation
yoast-components copied to clipboard

clipboardjs support on mobile

Open andizer opened this issue 6 years ago • 0 comments

Copy from: https://github.com/Yoast/yoast-premium-components/issues/12

See #11 (Add suggestions component)

Clipboard.js uses Document.execCommand() to execute copy/cut operations. According to MDN, there's no great support on mobile browsers. See the "Mobile" tab on https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand#AutoCompatibilityTable

No support on Android No support on Safari Mobile Unknown on IE and Opera

Looking at the clipboardjs demo page code, they implement a feedback message on the custom error event, to instruct users to use Cmd/Ctrl + C/X.

If mobile support is concern, a similar solution should be evaluated. This would also require to handle the focus on error in a different way, see https://github.com/Yoast/wordpress-seo-premium/issues/855

andizer avatar May 02 '18 13:05 andizer