From 336282d7d5efde9eb1e0de47c15b7475c3fed9c9 Mon Sep 17 00:00:00 2001 From: David Walsh Date: Wed, 28 Oct 2020 11:34:06 -0500 Subject: [PATCH] Focus on wallet address in buy workflow (#9715) --- ui/app/components/ui/qr-code/qr-code.js | 1 + ui/app/components/ui/readonly-input/readonly-input.js | 3 +++ 2 files changed, 4 insertions(+) diff --git a/ui/app/components/ui/qr-code/qr-code.js b/ui/app/components/ui/qr-code/qr-code.js index 53a0d85d5..c00885341 100644 --- a/ui/app/components/ui/qr-code/qr-code.js +++ b/ui/app/components/ui/qr-code/qr-code.js @@ -59,6 +59,7 @@ function QrCodeView (props) { /> diff --git a/ui/app/components/ui/readonly-input/readonly-input.js b/ui/app/components/ui/readonly-input/readonly-input.js index eba6fd6c2..b3e86c9c6 100644 --- a/ui/app/components/ui/readonly-input/readonly-input.js +++ b/ui/app/components/ui/readonly-input/readonly-input.js @@ -9,6 +9,7 @@ export default function ReadOnlyInput (props) { value, textarea, onClick, + autoFocus = false, } = props const InputType = textarea ? 'textarea' : 'input' @@ -21,6 +22,7 @@ export default function ReadOnlyInput (props) { readOnly onFocus={(event) => event.target.select()} onClick={onClick} + autoFocus={autoFocus} /> ) @@ -32,4 +34,5 @@ ReadOnlyInput.propTypes = { value: PropTypes.string, textarea: PropTypes.bool, onClick: PropTypes.func, + autoFocus: PropTypes.bool, }