Merge pull request #1985 from ajaxorg/focus
fix issue with scrolling into view on focus
This commit is contained in:
commit
5496351529
2 changed files with 27 additions and 19 deletions
|
|
@ -47,7 +47,11 @@ var MouseHandler = function(editor) {
|
|||
new DefaultGutterHandler(this);
|
||||
new DragdropHandler(this);
|
||||
|
||||
var focusEditor = function(e) { editor.focus() };
|
||||
var focusEditor = function(e) {
|
||||
if (!editor.isFocused() && editor.textInput)
|
||||
editor.textInput.onContextMenu(e);
|
||||
editor.focus()
|
||||
};
|
||||
|
||||
var mouseTarget = editor.renderer.getMouseEventTarget();
|
||||
event.addListener(mouseTarget, "click", this.onMouseEvent.bind(this, "click"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue