mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-12-23 09:52:26 +01:00
Fix click to copy for private key not working (#2360)
This commit is contained in:
parent
803eaaf968
commit
222a203353
@ -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 }),
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ ReadOnlyInput.prototype.render = function () {
|
||||
inputClass = '',
|
||||
value,
|
||||
textarea,
|
||||
onClick,
|
||||
} = this.props
|
||||
|
||||
const inputType = textarea ? 'textarea' : 'input'
|
||||
@ -25,6 +26,7 @@ ReadOnlyInput.prototype.render = function () {
|
||||
value,
|
||||
readOnly: true,
|
||||
onFocus: event => event.target.select(),
|
||||
onClick,
|
||||
}),
|
||||
])
|
||||
}
|
||||
|
@ -367,7 +367,7 @@
|
||||
line-height: 21px;
|
||||
border: none;
|
||||
height: 75px;
|
||||
width: 253px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
resize: none;
|
||||
padding: 9px 13px 8px;
|
||||
|
Loading…
Reference in New Issue
Block a user