From a69480d78d3a97310c7f39792133003b9bc058cb Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 20 Mar 2018 20:20:30 -0230 Subject: Gas inputs can be changed by up and down arrows (#3598) * Up and down arrows can control gas inputs. * input-number.js just uses number type. --- ui/app/components/currency-input.js | 2 ++ ui/app/components/input-number.js | 1 + 2 files changed, 3 insertions(+) (limited to 'ui/app') diff --git a/ui/app/components/currency-input.js b/ui/app/components/currency-input.js index 940238fa5..ece3eb43d 100644 --- a/ui/app/components/currency-input.js +++ b/ui/app/components/currency-input.js @@ -91,6 +91,7 @@ CurrencyInput.prototype.render = function () { placeholder, readOnly, inputRef, + type, } = this.props const { emptyState, focused } = this.state @@ -99,6 +100,7 @@ CurrencyInput.prototype.render = function () { const valueToRender = this.getValueToRender() return h('input', { className, + type, value: emptyState ? '' : valueToRender, placeholder: focused ? '' : placeholder, size: valueToRender.length * inputSizeMultiplier, diff --git a/ui/app/components/input-number.js b/ui/app/components/input-number.js index fd8c5c309..5600e35ee 100644 --- a/ui/app/components/input-number.js +++ b/ui/app/components/input-number.js @@ -55,6 +55,7 @@ InputNumber.prototype.render = function () { className: 'customize-gas-input', value, placeholder, + type: 'number', onInputChange: newValue => { this.setValue(newValue) }, -- cgit