Focus on wallet address in buy workflow (#9715)

feature/default_network_editable
David Walsh 4 years ago committed by GitHub
parent 96717cc9e0
commit 336282d7d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      ui/app/components/ui/qr-code/qr-code.js
  2. 3
      ui/app/components/ui/readonly-input/readonly-input.js

@ -59,6 +59,7 @@ function QrCodeView (props) {
/> />
<ReadOnlyInput <ReadOnlyInput
wrapperClass="ellip-address-wrapper" wrapperClass="ellip-address-wrapper"
autoFocus
value={checksumAddress(data)} value={checksumAddress(data)}
/> />
</div> </div>

@ -9,6 +9,7 @@ export default function ReadOnlyInput (props) {
value, value,
textarea, textarea,
onClick, onClick,
autoFocus = false,
} = props } = props
const InputType = textarea ? 'textarea' : 'input' const InputType = textarea ? 'textarea' : 'input'
@ -21,6 +22,7 @@ export default function ReadOnlyInput (props) {
readOnly readOnly
onFocus={(event) => event.target.select()} onFocus={(event) => event.target.select()}
onClick={onClick} onClick={onClick}
autoFocus={autoFocus}
/> />
</div> </div>
) )
@ -32,4 +34,5 @@ ReadOnlyInput.propTypes = {
value: PropTypes.string, value: PropTypes.string,
textarea: PropTypes.bool, textarea: PropTypes.bool,
onClick: PropTypes.func, onClick: PropTypes.func,
autoFocus: PropTypes.bool,
} }

Loading…
Cancel
Save