From f6c455cea90dad43e597cff44f915423e3c746b0 Mon Sep 17 00:00:00 2001 From: Carlos Abalde Date: Wed, 1 May 2019 05:29:11 +0200 Subject: [PATCH] Do not close on select if Ctrl or Meta (Cmd) keys are being held as described in #3400 (#5222) Fixes #3400 --- src/js/select2/dropdown/closeOnSelect.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/select2/dropdown/closeOnSelect.js b/src/js/select2/dropdown/closeOnSelect.js index fa6a82c4..f822702f 100644 --- a/src/js/select2/dropdown/closeOnSelect.js +++ b/src/js/select2/dropdown/closeOnSelect.js @@ -21,7 +21,7 @@ define([ var originalEvent = evt.originalEvent; // Don't close if the control key is being held - if (originalEvent && originalEvent.ctrlKey) { + if (originalEvent && (originalEvent.ctrlKey || originalEvent.metaKey)) { return; }