hotkey: Make enter checks more strict.

This should hopefully fix an obscure traceback we were seeing.
This commit is contained in:
Tim Abbott 2017-08-27 16:30:49 -07:00
parent 478f691792
commit 3e1bf86ced
1 changed files with 1 additions and 1 deletions

View File

@ -243,7 +243,7 @@ exports.process_escape_key = function (e) {
// Returns true if we handled it, false if the browser should.
exports.process_enter_key = function (e) {
if ($(".dropdown.open").length) {
if ($(".dropdown.open").length && $(e.target).attr("role") === "menuitem") {
// on #gear-menu li a[tabindex] elements, force a click and prevent default.
// this is because these links do not have an href and so don't force a
// default action.