diff --git a/browser/main/Components/BlueprintDeleteModal.jsx b/browser/main/Components/BlueprintDeleteModal.jsx index d5b4a852..5c4509f8 100644 --- a/browser/main/Components/BlueprintDeleteModal.jsx +++ b/browser/main/Components/BlueprintDeleteModal.jsx @@ -9,6 +9,7 @@ var BlueprintDeleteModal = React.createClass({ }, componentDidMount: function () { this.unsubscribe = PlanetStore.listen(this.onListen) + React.findDOMNode(this.refs.submit).focus() }, componentWillUnmount: function () { this.unsubscribe() @@ -23,12 +24,18 @@ var BlueprintDeleteModal = React.createClass({ stopPropagation: function (e) { e.stopPropagation() }, + handleKeyDown: function (e) { + if ((e.keyCode === 13 && e.metaKey)) { + e.preventDefault() + this.submit() + } + }, submit: function () { PlanetActions.deleteBlueprint(this.props.blueprint.id) }, render: function () { return ( -