diff options
author | Louis <6653109+artonge@users.noreply.github.com> | 2022-06-13 10:20:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-13 10:20:47 +0200 |
commit | 879a8c3b25387abb83924b9fa0f199ca6fa3d121 (patch) | |
tree | bf9ec3ddb6bf4916443fc98485ebe7a1802c255b /core | |
parent | 1d35efdd1fe67aed2007c8af51808c473bc03222 (diff) | |
parent | 04cec2b68602130da01ce91e3d44b6a5ad87f09e (diff) | |
download | nextcloud-server-879a8c3b25387abb83924b9fa0f199ca6fa3d121.tar.gz nextcloud-server-879a8c3b25387abb83924b9fa0f199ca6fa3d121.zip |
Merge pull request #32774 from nextcloud/enh/a11y/keyboard-legacy-contacts-menu
Enable keyboard activation of legacy contacts menu
Diffstat (limited to 'core')
-rw-r--r-- | core/src/jquery/contactsmenu.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/jquery/contactsmenu.js b/core/src/jquery/contactsmenu.js index 85a5c280d34..2cf2daec570 100644 --- a/core/src/jquery/contactsmenu.js +++ b/core/src/jquery/contactsmenu.js @@ -25,6 +25,7 @@ import $ from 'jquery' import OC from '../OC' +import { isA11yActivation } from '../Util/a11y.js' const LIST = '' + '<div class="menu popovermenu menu-left hidden contactsmenu-popover">' @@ -50,7 +51,11 @@ $.fn.contactsMenu = function(shareWith, shareType, appendTo) { appendTo.append(LIST) const $list = appendTo.find('div.contactsmenu-popover') - $div.click(function() { + $div.on('click keydown', function(event) { + if (!isA11yActivation(event)) { + return + } + if (!$list.hasClass('hidden')) { $list.addClass('hidden') $list.hide() |