← Back to team overview

mahara-contributors team mailing list archive

[Bug 1513665] Re: Get an HTML5 "click-to-copy" widget

 

Another update on this. The new release of clipboard.js claims that it
does support text-select (in input and textareas) in Safari on iOS now.
(I haven't tested this yet, firsthand.)

I guess this is a rapidly evolving area! Firefox was the last of the big
three browsers to add support for Document.execCommand('copy'), and they
just released that in FF 41 back in September.

So, it would still behoove us to wait a couple of weeks to see how
things shake out on this. Either that, or upgrade now, but be prepared
to come back and update or swap out the library as needed in the months
to come. Both ZeroClipboard and clipboard.js have a quite similar API,
so it is not that hard to interchange them.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1513665

Title:
  Get an HTML5 "click-to-copy" widget

Status in Mahara:
  Confirmed

Bug description:
  In Bug 1314890, on the Secret URLs page we added the zeroclipboard
  library to allow users to click a clipboard icon and have the URL
  copied to their clipboard. Unfortunately, since then Flash has started
  dying in a bad way, and now this sort of Flash-based clipboard widget
  is on the way out, and can cause browsers to pop up warning messages
  and such.

  Now, there is no way to accomplish exactly this same functionality
  (copy to clipboard) without Flash currently. But, there are some
  useable alternatives. The one that seems to be poised to replace the
  click-to-copy pattern, is that you click and it automatically selects
  the full text, so that you then just have to hit "control-C" instead
  of first dragging to select it all.

  Jen recently added this little clipboard library to the styleguide.php
  script. It works pretty good, so we may as well adopt it for the
  Secret URL screen as well.

  http://zenorocha.github.io/clipboard.js/

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1513665/+subscriptions


References