diff --git a/client/app/components/dashboards/edit-dashboard-dialog.html b/client/app/components/dashboards/edit-dashboard-dialog.html index f7ed07c140..42f0e1d683 100644 --- a/client/app/components/dashboards/edit-dashboard-dialog.html +++ b/client/app/components/dashboards/edit-dashboard-dialog.html @@ -4,7 +4,7 @@
- +
diff --git a/client/app/components/dashboards/edit-dashboard-dialog.js b/client/app/components/dashboards/edit-dashboard-dialog.js index f33b461a37..ad59e8f381 100644 --- a/client/app/components/dashboards/edit-dashboard-dialog.js +++ b/client/app/components/dashboards/edit-dashboard-dialog.js @@ -66,6 +66,16 @@ const EditDashboardDialog = { Events.record('create', 'dashboard'); } }; + this.saveDashboardOnEnter = ($event) => { + // keyCode 13 is the Enter key + if ($event.keyCode === 13) { + this.saveDashboard(); + } + }; + this.closeWithoutSave = () => { + this.dashboard.name = this.dashboard.existing_name; + this.dismiss(); + }; }, };