fix(edit) setMenu: set focus on editor insted of prompt when "Go To Line" activated

This commit is contained in:
coderaiser 2016-03-05 15:18:18 -05:00
parent 52a151f4b0
commit 5944a966e2

View file

@ -163,13 +163,15 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, Format;
event.preventDefault();
!Menu && DOM.loadRemote('menu', function(error) {
var options = {
var noFocus,
options = {
beforeShow: function(params) {
params.x -= 18;
params.y -= 27;
},
afterClick: function() {
editor.focus();
!noFocus && editor.focus();
}
},
menuData = {
@ -177,6 +179,7 @@ var CloudCmd, Util, DOM, CloudFunc, MenuIO, Format;
editor.save();
},
'Go To Line Ctrl+G' : function() {
noFocus = true;
editor.goToLine();
},
'Cut Ctrl+X' : function() {