diff options
author | Christopher Ng <chrng8@gmail.com> | 2022-06-09 02:31:11 +0000 |
---|---|---|
committer | Christopher Ng <chrng8@gmail.com> | 2022-06-10 01:32:34 +0000 |
commit | 04cec2b68602130da01ce91e3d44b6a5ad87f09e (patch) | |
tree | 29d8c9dbea4dbb19369bc057a27a110983b15b76 /core/src | |
parent | b1616dea537db24280fe683b6124936c91e1fc82 (diff) | |
download | nextcloud-server-04cec2b68602130da01ce91e3d44b6a5ad87f09e.tar.gz nextcloud-server-04cec2b68602130da01ce91e3d44b6a5ad87f09e.zip |
Enable keyboard activation of legacy contacts menu
Signed-off-by: Christopher Ng <chrng8@gmail.com>
Diffstat (limited to 'core/src')
-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() |