Fix refernce to the editor element
This commit is contained in:
@@ -61,9 +61,8 @@ angular.module('app.frontend')
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
window.addEventListener('keydown', handler);
|
var element = document.getElementById("note-text-editor");
|
||||||
var editor = document.getElementById("note-text-editor");
|
element.addEventListener('keydown', handleTab);
|
||||||
editor.addEventListener('keydown', handleTab);
|
|
||||||
|
|
||||||
|
|
||||||
scope.$on('$destroy', function(){
|
scope.$on('$destroy', function(){
|
||||||
@@ -109,7 +108,8 @@ angular.module('app.frontend')
|
|||||||
|
|
||||||
this.focusEditor = function(delay) {
|
this.focusEditor = function(delay) {
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
editor.focus();
|
var element = document.getElementById("note-text-editor");
|
||||||
|
element.focus();
|
||||||
}, delay)
|
}, delay)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user