Browse Source

HUE-7110 [editor] Focus on the SQL editor when opening Hue

Enrico Berti 8 years ago
parent
commit
79c7412f9e

+ 3 - 0
desktop/libs/notebook/src/notebook/static/notebook/js/notebook.ko.js

@@ -279,6 +279,9 @@ var EditorViewModel = (function() {
 
     // Ace stuff
     self.ace = ko.observable(null);
+    self.ace.subscribe(function () {
+      self.ace().focus();
+    });
     self.errors = ko.observableArray([]);
 
     self.aceErrorsHolder = ko.observableArray([]);