Fix logic to check if any hook handled ACE key event. Fix #2818

Instead of checking if only the first hook had returned true, we check
all hooks.
This commit is contained in:
Luiza Pagliari 2015-10-27 07:44:51 -02:00
parent 6c68396ed5
commit c551fe4c1e
1 changed files with 6 additions and 1 deletions

View File

@ -3715,7 +3715,12 @@ function Ace2Inner(){
documentAttributeManager: documentAttributeManager,
evt:evt
});
specialHandled = (specialHandledInHook&&specialHandledInHook.length>0)?specialHandledInHook[0]:specialHandled;
// if any hook returned true, set specialHandled with true
if (specialHandledInHook) {
specialHandled = _.contains(specialHandledInHook, true);
}
if ((!specialHandled) && altKey && isTypeForSpecialKey && keyCode == 120){
// Alt F9 focuses on the File Menu and/or editbar.
// Note that while most editors use Alt F10 this is not desirable