diff options
Diffstat (limited to 'settings/js/federationsettingsview.js')
-rw-r--r-- | settings/js/federationsettingsview.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/settings/js/federationsettingsview.js b/settings/js/federationsettingsview.js index e2781833ed7..9cefaf132f2 100644 --- a/settings/js/federationsettingsview.js +++ b/settings/js/federationsettingsview.js @@ -70,6 +70,16 @@ }); $icon.append(scopeMenu.$el); $icon.on('click', _.bind(scopeMenu.show, scopeMenu)); + $icon.on('keydown', function(e) { + if (e.keyCode === 32) { + // Open the menu when the user presses the space bar + e.preventDefault(); + scopeMenu.show(e); + } else if (e.keyCode === 27) { + // Close the menu again if opened + OC.hideMenus(); + } + }.bind(this)); // Restore initial state self._setFieldScopeIcon(field, self._config.get(field + 'Scope')); |