Skip to content

Commit bb59c5b

Browse files
authored
Merge pull request #610 from Augmint/staging
Release v1.1.1 to production
2 parents 4462b41 + f3974cd commit bb59c5b

5 files changed

Lines changed: 5 additions & 44 deletions

File tree

src/containers/exchange/components/PlaceOrderForm.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ class PlaceOrderForm extends React.Component {
5050
this.props.ethAmount
5151
);
5252
}
53-
54-
this.focusInput();
5553
}
5654

5755
toggleOrderBook(e) {
@@ -62,8 +60,6 @@ class PlaceOrderForm extends React.Component {
6260
onOrderDirectionChange(e) {
6361
this.setState({ orderDirection: +e.target.attributes["data-index"].value });
6462
this.toggleOrderBook(+e.target.attributes["data-index"].value);
65-
66-
this.focusInput();
6763
}
6864

6965
onTokenAmountChange(e) {
@@ -157,14 +153,6 @@ class PlaceOrderForm extends React.Component {
157153
return Math.round(price * 100) / 10000;
158154
}
159155

160-
focusInput() {
161-
if (this.input && window.innerWidth > 768) {
162-
ReactDOM.findDOMNode(this.input)
163-
.getElementsByTagName("input")[0]
164-
.focus();
165-
}
166-
}
167-
168156
render() {
169157
const {
170158
header: mainHeader,
@@ -264,6 +252,7 @@ class PlaceOrderForm extends React.Component {
264252
data-testid="tokenAmountInput"
265253
style={{ borderRadius: theme.borderRadius.left }}
266254
labelAlignRight="A-EUR"
255+
autoFocus={true}
267256
/>
268257

269258
<Styledlabel style={{ margin: "5px 0 0 0" }}>

src/containers/funding/components/AddWithdrawForm.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ class AddWithdrawForm extends React.Component {
2828
this.onTokenAmountChange = this.onTokenAmountChange.bind(this);
2929
}
3030

31-
componentDidUpdate() {
32-
this.focusInput();
33-
}
34-
3531
onPriceChange(e) {
3632
const amount = e.target.value;
3733
this.setState({
@@ -82,8 +78,6 @@ class AddWithdrawForm extends React.Component {
8278
}
8379

8480
onMenuClick(e) {
85-
this.focusInput();
86-
8781
if (e.target.attributes["data-index"].value === ADDFUND) {
8882
this.setState({
8983
orderDirection: ADDFUND
@@ -95,14 +89,6 @@ class AddWithdrawForm extends React.Component {
9589
}
9690
}
9791

98-
focusInput() {
99-
if (this.input && window.innerWidth > 768) {
100-
ReactDOM.findDOMNode(this.input)
101-
.getElementsByTagName("input")[0]
102-
.focus();
103-
}
104-
}
105-
10692
render() {
10793
const { error, user } = this.props;
10894
const { orderDirection, amount } = this.state;
@@ -188,6 +174,7 @@ class AddWithdrawForm extends React.Component {
188174
data-testid={`${orderDirection}Input`}
189175
style={{ borderRadius: theme.borderRadius.left }}
190176
labelAlignRight={orderDirection === ADDFUND ? "EUR" : "A-EUR"}
177+
autoFocus={true}
191178
/>
192179
<label>Available exchange partner:</label>
193180

src/containers/loan/newLoan/NewLoanForm.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,6 @@ class NewLoanForm extends React.Component {
9090
this.setProduct(); // needed when landing from on URL directly
9191
}
9292

93-
if (this.input && window.innerWidth > 768) {
94-
ReactDOM.findDOMNode(this.input)
95-
.getElementsByTagName("input")[0]
96-
.focus();
97-
}
98-
9993
// if (!this.props.rates.isLoading && !this.state.initialized) {
10094
// this.initForm();
10195
// }
@@ -332,6 +326,7 @@ class NewLoanForm extends React.Component {
332326
data-testid="loanTokenAmountInput"
333327
style={{ borderRadius: theme.borderRadius.left }}
334328
labelAlignRight="A-EUR"
329+
autoFocus={true}
335330
/>
336331

337332
{this.state.productId !== null && this.state.productId !== undefined && (

src/containers/lock/containers/LockForm/index.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,6 @@ class LockContainer extends React.Component {
6969
if (this.props.lockProducts && this.props.lockProducts.length && !this.state.initialized) {
7070
this.initForm();
7171
}
72-
73-
if (this.input && window.innerWidth > 768) {
74-
ReactDOM.findDOMNode(this.input)
75-
.getElementsByTagName("input")[0]
76-
.focus();
77-
}
7872
}
7973

8074
resetAndInitForm() {
@@ -275,6 +269,7 @@ class LockContainer extends React.Component {
275269
style={{ borderRadius: theme.borderRadius.left }}
276270
labelAlignRight="A-EUR"
277271
data-testid="lockAmountInput"
272+
autoFocus={true}
278273
/>
279274

280275
<Field

src/containers/transfer/components/TokenTransferForm.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,6 @@ class TokenTransferForm extends React.Component {
5555

5656
this.setState({ urlResolved: true });
5757
}
58-
59-
if (this.input && window.innerWidth > 768) {
60-
ReactDOM.findDOMNode(this.input)
61-
.getElementsByTagName("input")[0]
62-
.focus();
63-
}
6458
}
6559

6660
onTokenAmountChange(e) {
@@ -179,6 +173,7 @@ class TokenTransferForm extends React.Component {
179173
data-testid="transferAmountInput"
180174
style={{ borderRadius: theme.borderRadius.left, marginBottom: "0" }}
181175
labelAlignRight="A-EUR"
176+
autoFocus={true}
182177
/>
183178
{(augmintToken.info.feeMax !== 0 ||
184179
augmintToken.info.feeMin !== 0 ||

0 commit comments

Comments
 (0)