aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components/readonly-input.js
diff options
context:
space:
mode:
Diffstat (limited to 'ui/app/components/readonly-input.js')
-rw-r--r--ui/app/components/readonly-input.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/app/components/readonly-input.js b/ui/app/components/readonly-input.js
index 934cbefae..33b93b5a0 100644
--- a/ui/app/components/readonly-input.js
+++ b/ui/app/components/readonly-input.js
@@ -14,13 +14,17 @@ ReadOnlyInput.prototype.render = function () {
wrapperClass = '',
inputClass = '',
value,
+ textarea,
} = this.props
+ const inputType = textarea ? 'textarea' : 'input'
+
return h('div', {className: wrapperClass}, [
- h('input', {
+ h(inputType, {
className: inputClass,
value,
readOnly: true,
+ onFocus: event => event.target.select(),
}),
])
}