Skip to content

Commit

Permalink
Remove deprecated keyboard events & properties
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Ndung'u <kevgathuku@gmail.com>
  • Loading branch information
kevgathuku authored and danxuliu committed Jul 24, 2018
1 parent 1cdf808 commit fe25092
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/js/js.js
Original file line number Diff line number Diff line change
Expand Up @@ -684,12 +684,12 @@ var OCP = {},
registerMenu: function($toggle, $menuEl, toggle, headerMenu) {
var self = this;
$menuEl.addClass('menu');
$toggle.on('click.menu keypress.menu', function(event) {
$toggle.on('click.menu keyup.menu', function(event) {
// prevent the link event (append anchor to URL)
event.preventDefault();

// allow enter key as a trigger
if (event.keyCode && event.keyCode !== 13) {
if (event.key && event.key !== "Enter") {
return;
}

Expand Down Expand Up @@ -1431,7 +1431,7 @@ function initCore() {
$(document).on('mouseup.closemenus', function(event) {

// allow enter as a trigger
// if (event.keyCode && event.keyCode !== 13) {
// if (event.key && event.key !== "Enter") {
// return;
// }

Expand Down

0 comments on commit fe25092

Please sign in to comment.