Notebooks: Fix Selection/Focus when New Cells Added (#3649)

* Improvemnents to Active Cell

* Fix minor spacing issue

* fix editor focus order

* Fix for add cell above/below

* cleanup logic to have activeCell logic all reside in notebook model
This commit is contained in:
Chris LaFreniere
2019-01-02 15:20:05 -08:00
committed by GitHub
parent 5367101330
commit 2d52bc2a49
3 changed files with 26 additions and 20 deletions

View File

@@ -128,6 +128,7 @@ export class CodeComponent extends AngularDisposable implements OnInit, OnChange
let uri = this.createUri();
this._editorInput = instantiationService.createInstance(UntitledEditorInput, uri, false, this.cellModel.language, '', '');
this._editor.setInput(this._editorInput, undefined);
this._editor.focus();
this._editorInput.resolve().then(model => {
this._editorModel = model.textEditorModel;
this._modelService.updateModel(this._editorModel, this.cellModel.source);