mirror of
https://github.com/coderaiser/cloudcmd.git
synced 2026-07-19 01:17:18 +00:00
Update lib/client/viewer.js
This commit is contained in:
parent
0ffda0c7ae
commit
823d3ab99c
1 changed files with 13 additions and 4 deletions
|
|
@ -133,7 +133,7 @@ CloudCommander.Viewer.Keys = (function(){
|
|||
/* если клавиши можно обрабатывать */
|
||||
if(CloudCommander.keyBinded)
|
||||
/* if f3 pressed */
|
||||
if(event.keyCode===114){
|
||||
if(event.keyCode === CloudCommander.KEY.F3){
|
||||
CloudCommander.Viewer.FancyBox.show();
|
||||
|
||||
event.preventDefault();
|
||||
|
|
@ -145,9 +145,18 @@ CloudCommander.Viewer.Keys = (function(){
|
|||
if (document.addEventListener)
|
||||
document.addEventListener('keydown', key_event(),false);
|
||||
|
||||
else
|
||||
document.onkeypress=key_event;
|
||||
|
||||
else{
|
||||
var lFunc;
|
||||
if(typeof document.onkeydown === 'function')
|
||||
lFunc = document.onkeydown;
|
||||
|
||||
document.onkeydown = function(){
|
||||
if(lFunc)
|
||||
lFunc();
|
||||
|
||||
key_event();
|
||||
}
|
||||
}
|
||||
/* showing images preview*/
|
||||
CloudCommander.Viewer.FancyBox.show();
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue