mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-08-04 05:33:10 +00:00
fix(edit) setMenu: set focus on editor insted of prompt when "Go To Line" activated
This commit is contained in:
parent
52a151f4b0
commit
5944a966e2
1 changed files with 5 additions and 2 deletions
|
|
@ -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() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue