Merge pull request #4647 from MetaMask/fix-overflow-currency-display

Fix issues with scrollbar in currency display.
feature/default_network_editable
Dan J Miller 7 years ago committed by GitHub
commit f6238b2d39
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      ui/app/components/send/currency-display.js
  2. 1
      ui/app/components/send_/send-content/send-amount-row/send-amount-row.component.js
  3. 9
      ui/app/css/itcss/components/currency-display.scss

@ -118,6 +118,7 @@ CurrencyDisplay.prototype.render = function () {
readOnly = false, readOnly = false,
inError = false, inError = false,
onBlur, onBlur,
step,
} = this.props } = this.props
const { valueToRender } = this.state const { valueToRender } = this.state
@ -149,9 +150,10 @@ CurrencyDisplay.prototype.render = function () {
} : {}), } : {}),
ref: input => { this.currencyInput = input }, ref: input => { this.currencyInput = input },
style: { style: {
minWidth: this.getInputWidth(valueToRender, readOnly), width: this.getInputWidth(valueToRender, readOnly),
}, },
min: 0, min: 0,
step,
}), }),
h('span.currency-display__currency-symbol', primaryCurrency), h('span.currency-display__currency-symbol', primaryCurrency),

@ -95,6 +95,7 @@ export default class SendAmountRow extends Component {
primaryCurrency={primaryCurrency || 'ETH'} primaryCurrency={primaryCurrency || 'ETH'}
selectedToken={selectedToken} selectedToken={selectedToken}
value={amount} value={amount}
step="any"
/> />
</SendRowWrapper> </SendRowWrapper>
) )

@ -48,15 +48,20 @@
display: flex; display: flex;
flex: 1; flex: 1;
max-width: 100%; max-width: 100%;
overflow-x: scroll;
input[type="number"] {
-moz-appearance: textfield;
}
input[type="number"]::-webkit-inner-spin-button { input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none;
display: none; display: none;
} }
input[type="number"]:hover::-webkit-inner-spin-button { input[type="number"]:hover::-webkit-inner-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none;
display: none; display: none;
} }
} }
@ -69,11 +74,13 @@
.react-numeric-input { .react-numeric-input {
input[type="number"]::-webkit-inner-spin-button { input[type="number"]::-webkit-inner-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none;
display: none; display: none;
} }
input[type="number"]:hover::-webkit-inner-spin-button { input[type="number"]:hover::-webkit-inner-spin-button {
-webkit-appearance: none; -webkit-appearance: none;
-moz-appearance: none;
display: none; display: none;
} }
} }

Loading…
Cancel
Save