From 976b85bc3c2b01205346b81aa5dcd8bd580c9b99 Mon Sep 17 00:00:00 2001 From: Gaurav Munjal Date: Thu, 23 Jul 2015 17:04:16 -0400 Subject: [PATCH] Fix file selector does not change activeFile on focus --- app/components/file-editor-column.js | 2 +- app/gist/controller.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/components/file-editor-column.js b/app/components/file-editor-column.js index d5730ef8..b3207ad1 100644 --- a/app/components/file-editor-column.js +++ b/app/components/file-editor-column.js @@ -16,7 +16,7 @@ export default Em.Component.extend({ }), focusIn () { - this.sendAction('focusEditor', this.get('col')); + this.sendAction('focusEditor', this); }, actions: { diff --git a/app/gist/controller.js b/app/gist/controller.js index 54229691..9c9f9e08 100644 --- a/app/gist/controller.js +++ b/app/gist/controller.js @@ -76,8 +76,9 @@ export default Em.Controller.extend({ }), actions: { - focusEditor (editorCol) { - this.set('activeEditorCol', editorCol); + focusEditor (editor) { + this.set('activeEditorCol', editor.get('col')); + this.set('activeFile', editor.get('file')); }, selectFile (file) {