From bc3377164ea82820854f4152ed421c6e908e0e41 Mon Sep 17 00:00:00 2001 From: Max Ogden Date: Tue, 30 Sep 2014 20:41:33 -0700 Subject: [PATCH] add metaKey rule to event cancel function --- src/term.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/term.js b/src/term.js index f26617d..4b4cf25 100644 --- a/src/term.js +++ b/src/term.js @@ -5633,6 +5633,10 @@ function off(el, type, handler, capture) { } function cancel(ev) { + // if metaKey (command/apple key on Mac) is pressed then don't cancel event + // this makes stuff like command+L to focus URL bar work + if (ev.metaKey) return + if (ev.preventDefault) ev.preventDefault(); ev.returnValue = false; if (ev.stopPropagation) ev.stopPropagation();