set give focus in code editor

This commit is contained in:
Mitsuhiro Tanda
2017-09-08 01:04:32 +09:00
parent 93be16b106
commit ce0de35a6c
2 changed files with 4 additions and 1 deletions

View File

@@ -110,6 +110,9 @@ function link(scope, elem, attrs) {
elem.addClass("gf-code-editor");
let textarea = elem.find("textarea");
textarea.addClass('gf-form-input');
if (attrs.giveFocus) {
textarea.attr('give-focus', attrs.giveFocus);
}
// Event handlers
editorSession.on('change', (e) => {