Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorLouis <6653109+artonge@users.noreply.github.com>2022-06-13 11:20:47 +0300
committerGitHub <noreply@github.com>2022-06-13 11:20:47 +0300
commit879a8c3b25387abb83924b9fa0f199ca6fa3d121 (patch)
treebf9ec3ddb6bf4916443fc98485ebe7a1802c255b /core
parent1d35efdd1fe67aed2007c8af51808c473bc03222 (diff)
parent04cec2b68602130da01ce91e3d44b6a5ad87f09e (diff)
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.js7
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()