Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Copy response key to clipboard when clicked on #4

Open
gbraad opened this Issue · 5 comments

3 participants

Gerard Braad — 吉拉德 br0x multiwebinc
Gerard Braad — 吉拉德
Owner

clipboardData.setData("Text", s); only works on IE. Need to have a good cross browser solution which might also work on Webkit-based browsers.

http://stackoverflow.com/questions/7713182/copy-to-clipboard-for-all-browsers-using-javascript
http://stackoverflow.com/questions/400212/how-to-copy-to-the-clipboard-in-javascript

br0x

Why not use ZeroClipboard library? Flash currently is the only cross-browser solution.

Gerard Braad — 吉拉德
Owner

@bjoernWahle Thank you for your contribution, however Flash is not considered a viable solution. It might be the only cross-browser desktop solution,however Flash support got dropped for Linux and the same goes for mobile platforms, such as iOS, Android, ChromeOS and FirefoxOS.

In my opinion this can not be fixed until a standardized API is provided.

multiwebinc

@gbraad What about providing multiple ways to copy based on what is available to the browser, such as HTML5 clipboard or document.execCommand('copy'); for extensions/apps and falling back to using ZeroClipboard if flash is available for the web version? This should at least cover the majority of people. And if nothing is available, create an <input> containing the OTP and select the text.

Who knows if there is ever going to be a totally cross-browser solution, but we could at least accommodate with what is available now.

br0x

@multiwebinc Absolutely agree!

Gerard Braad — 吉拉德
Owner

I might re-evaluate...But want to prevent to increase the footprint of the mobile application. Since appcache is used, even the flash gets downloaded on a mobile phone when not in use. Most of the users are on mobile platforms...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.