diff options
author | John McLear <john@mclear.co.uk> | 2015-11-02 13:08:30 +0000 |
---|---|---|
committer | John McLear <john@mclear.co.uk> | 2015-11-02 13:08:30 +0000 |
commit | c575c8b4472f7609631887b2e3c165467b37a17c (patch) | |
tree | b8878b4d80d874e440b1ce26f15ce652af5f40d6 | |
parent | 2b980653d6ac679f939b3f5b52352992a47f078a (diff) | |
parent | c551fe4c1eee7cc7a5c595f222190aac66fe6b78 (diff) | |
download | etherpad-lite-c575c8b4472f7609631887b2e3c165467b37a17c.zip |
Merge pull request #2820 from storytouch/fix_2818
Fix logic to check if any hook handled ACE key event. Fix #2818
-rw-r--r-- | src/static/js/ace2_inner.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/static/js/ace2_inner.js b/src/static/js/ace2_inner.js index 7ab4b7b5..8c03fa66 100644 --- a/src/static/js/ace2_inner.js +++ b/src/static/js/ace2_inner.js @@ -3710,7 +3710,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 |