Skip to content

Commit

Permalink
Menu Button Examples: Fix 11 JSCS Errors
Browse files Browse the repository at this point in the history
  • Loading branch information
mcking65 committed Apr 27, 2017
1 parent 20afc42 commit 50d0eb8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
2 changes: 1 addition & 1 deletion examples/menu-button/js/MenuItemAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ MenuItem.prototype.handleKeydown = function (event) {
}
break;
}
}
}

if (flag) {
event.stopPropagation();
Expand Down
9 changes: 2 additions & 7 deletions examples/menu-button/js/MenuItemLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@ MenuItemLinks.prototype.handleKeydown = function (event) {
return str.length === 1 && str.match(/\S/);
}

if (event.ctrlKey ||
event.altKey ||
event.metaKey ||
(event.keyCode === this.keyCode.SPACE) ||
(event.keyCode === this.keyCode.RETURN)) {
if (event.ctrlKey || event.altKey || event.metaKey || (event.keyCode === this.keyCode.SPACE) || (event.keyCode === this.keyCode.RETURN)) {
return;
}

Expand Down Expand Up @@ -139,10 +135,9 @@ MenuItemLinks.prototype.handleKeydown = function (event) {
this.menu.setFocusByFirstCharacter(this, char);
}
break;
}
}
}


if (flag) {
event.stopPropagation();
event.preventDefault();
Expand Down
2 changes: 1 addition & 1 deletion examples/menu-button/js/PopupMenuActionActivedescendant.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ PopupMenuActionActivedescendant.prototype.handleKeydown = function (event) {
this.setFocusByFirstCharacter(char);
}
break;
}
}
}

if (flag) {
Expand Down

0 comments on commit 50d0eb8

Please sign in to comment.