diff options
author | Alexander Tseung <alextsg@users.noreply.github.com> | 2017-10-14 04:23:10 +0800 |
---|---|---|
committer | Daniel Tsui <szehungdanieltsui@gmail.com> | 2017-10-14 04:23:10 +0800 |
commit | 222a203353dd977f497d44bf6581c16200b5de4f (patch) | |
tree | 6a9c394db6c4e2ac3283b3e712ae411575f776fd /ui/app/components/modals | |
parent | 803eaaf968161f16aaf72d59b979dfbb7fb9b352 (diff) | |
download | tangerine-wallet-browser-222a203353dd977f497d44bf6581c16200b5de4f.tar tangerine-wallet-browser-222a203353dd977f497d44bf6581c16200b5de4f.tar.gz tangerine-wallet-browser-222a203353dd977f497d44bf6581c16200b5de4f.tar.bz2 tangerine-wallet-browser-222a203353dd977f497d44bf6581c16200b5de4f.tar.lz tangerine-wallet-browser-222a203353dd977f497d44bf6581c16200b5de4f.tar.xz tangerine-wallet-browser-222a203353dd977f497d44bf6581c16200b5de4f.tar.zst tangerine-wallet-browser-222a203353dd977f497d44bf6581c16200b5de4f.zip |
Fix click to copy for private key not working (#2360)
Diffstat (limited to 'ui/app/components/modals')
-rw-r--r-- | ui/app/components/modals/export-private-key-modal.js | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/app/components/modals/export-private-key-modal.js b/ui/app/components/modals/export-private-key-modal.js index ddc7f1352..302596eda 100644 --- a/ui/app/components/modals/export-private-key-modal.js +++ b/ui/app/components/modals/export-private-key-modal.js @@ -7,6 +7,7 @@ const actions = require('../../actions') const AccountModalContainer = require('./account-modal-container') const { getSelectedIdentity } = require('../../selectors') const ReadOnlyInput = require('../readonly-input') +const copyToClipboard = require('copy-to-clipboard') function mapStateToProps (state) { return { @@ -61,11 +62,12 @@ ExportPrivateKeyModal.prototype.renderPasswordInput = function (privateKey) { inputClass: 'private-key-password-display-textarea', textarea: true, value: plainKey, + onClick: () => copyToClipboard(plainKey), }) : h('input.private-key-password-input', { type: 'password', placeholder: 'Type password', - onChange: event => this.setState({ password: event.target.value }) + onChange: event => this.setState({ password: event.target.value }), }) } @@ -115,7 +117,7 @@ ExportPrivateKeyModal.prototype.render = function () { }), h('div.account-modal-divider'), - + h('span.modal-body-title', 'Download Private Keys'), h('div.private-key-password', {}, [ @@ -132,6 +134,6 @@ ExportPrivateKeyModal.prototype.render = function () { ), this.renderButtons(privateKey, this.state.password, address, hideModal), - + ]) } |