From aa8cf504f876182048e1f0e5b72b234b10a7f472 Mon Sep 17 00:00:00 2001 From: Simon Fondrie-Teitler Date: Wed, 26 Apr 2017 20:28:27 -0400 Subject: [feat] Go to first open line when enter is pressed When filling out the signup or login pages, and when adding an additional service provider, the enter key will trigger the submit action. When on the choose provider page, enter will take you to the next page. - Resolves: #8841 --- ui/app/components/wizard/provider_select_stage.js | 32 ++++++++++++++++------- 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'ui/app/components/wizard/provider_select_stage.js') diff --git a/ui/app/components/wizard/provider_select_stage.js b/ui/app/components/wizard/provider_select_stage.js index 2a342d9b..b19fc8ac 100644 --- a/ui/app/components/wizard/provider_select_stage.js +++ b/ui/app/components/wizard/provider_select_stage.js @@ -33,12 +33,13 @@ export default class ProviderSelectStage extends React.Component { provider: null, // Provider object, if selected error: null // error message } - this.add = this.add.bind(this) - this.remove = this.remove.bind(this) - this.select = this.select.bind(this) - this.close = this.close.bind(this) - this.cancel = this.cancel.bind(this) - this.next = this.next.bind(this) + this.add = this.add.bind(this) + this.remove = this.remove.bind(this) + this.select = this.select.bind(this) + this.close = this.close.bind(this) + this.cancel = this.cancel.bind(this) + this.next = this.next.bind(this) + this.onKeyDown = this.onKeyDown.bind(this) } componentWillMount() { @@ -134,6 +135,13 @@ export default class ProviderSelectStage extends React.Component { }) } + onKeyDown(e) { + // Check for enter key + if (e.keyCode === 13) { + this.next(); + } + } + render() { let modal = null let info = null @@ -171,9 +179,15 @@ export default class ProviderSelectStage extends React.Component { ) - let editlist = + let editlist = return( -- cgit v1.2.3