mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-01-23 10:45:47 +00:00
fixed bug with pressing Esc when menu showed
This commit is contained in:
parent
5fcd84c559
commit
192598101a
4 changed files with 11 additions and 6 deletions
|
|
@ -34,6 +34,10 @@ to cloudcmd.js
|
|||
|
||||
* DropBox, GDrive and GitHub modules now look the same.
|
||||
|
||||
* Fixed bug with pressing Esc when menu showed.
|
||||
We could not to now, when key was pressed becaouse of
|
||||
stopPropogation function in jquery.contextMenu module.
|
||||
|
||||
|
||||
2012.12.12, Version 0.1.8
|
||||
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ var CloudCommander, Util, DOM, $;
|
|||
// define the elements of the menu
|
||||
items: getAllItems({
|
||||
'View' : Util.retExec(showEditor, true),
|
||||
'Edit' : Util.retExec(showEditor),
|
||||
'Edit' : Util.retExec(showEditor, false),
|
||||
'Delete' : Util.retExec(DOM.promptRemoveCurrent),
|
||||
'Upload to' : getUploadToItem( ['GitHub', 'GDrive', 'DropBox'] ),
|
||||
'Download' : function(key, opt){
|
||||
|
|
@ -246,8 +246,7 @@ var CloudCommander, Util, DOM, $;
|
|||
/* if document.onclick was set up
|
||||
* before us, it's best time to call it
|
||||
*/
|
||||
if(typeof lFunc_f === 'function')
|
||||
lFunc_f();
|
||||
Util.exec(lFunc_f);
|
||||
|
||||
KeyBinding.set();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ var // currently active contextMenu trigger
|
|||
// x and y are given (by mouse event)
|
||||
var triggerIsFixed = opt.$trigger.parents().andSelf()
|
||||
.filter(function() {
|
||||
return $(this).css('position') == "fixed";
|
||||
return $($this).css('position') == "fixed";
|
||||
}).length;
|
||||
|
||||
if (triggerIsFixed) {
|
||||
|
|
@ -428,7 +428,7 @@ var // currently active contextMenu trigger
|
|||
e.preventDefault();
|
||||
}
|
||||
|
||||
e.stopPropagation();
|
||||
//e.stopPropagation();
|
||||
},
|
||||
key: function(e) {
|
||||
var opt = $currentTrigger.data('contextMenu') || {},
|
||||
|
|
|
|||
|
|
@ -243,7 +243,9 @@ var Util, exports;
|
|||
*/
|
||||
Util.retExec = function(pCallBack, pArg){
|
||||
return function(pArgument){
|
||||
Util.exec(pCallBack, pArg || pArgument);
|
||||
if( !Util.isUndefined(pArg) )
|
||||
pArgument = pArg;
|
||||
Util.exec(pCallBack, pArgument);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue