add blur() method
This commit is contained in:
parent
0848743978
commit
7344f24d71
2 changed files with 6 additions and 2 deletions
|
|
@ -10,7 +10,7 @@ ace.Editor = function(renderer, doc) {
|
||||||
var self = this;
|
var self = this;
|
||||||
ace.addListener(container, "mousedown", function(e) {
|
ace.addListener(container, "mousedown", function(e) {
|
||||||
self.focus();
|
self.focus();
|
||||||
return ace.stopEvent(e);
|
return ace.preventDefault(e);
|
||||||
});
|
});
|
||||||
|
|
||||||
var mouseTarget = renderer.getMouseEventTarget();
|
var mouseTarget = renderer.getMouseEventTarget();
|
||||||
|
|
@ -117,6 +117,10 @@ ace.Editor.prototype.focus = function() {
|
||||||
this.textInput.focus();
|
this.textInput.focus();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ace.Editor.prototype.blur = function() {
|
||||||
|
this.textInput.blur();
|
||||||
|
};
|
||||||
|
|
||||||
ace.Editor.prototype.onFocus = function() {
|
ace.Editor.prototype.onFocus = function() {
|
||||||
this.renderer.showCursor();
|
this.renderer.showCursor();
|
||||||
this.renderer.visualizeFocus();
|
this.renderer.visualizeFocus();
|
||||||
|
|
|
||||||
|
|
@ -79,6 +79,6 @@ ace.TextInput = function(parentNode, host) {
|
||||||
};
|
};
|
||||||
|
|
||||||
this.blur = function() {
|
this.blur = function() {
|
||||||
this.blur();
|
text.blur();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
Loading…
Add table
Add a link
Reference in a new issue