mirror of https://github.com/zulip/zulip.git
hotkey: Make enter checks more strict.
This should hopefully fix an obscure traceback we were seeing.
This commit is contained in:
parent
478f691792
commit
3e1bf86ced
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue