From 44523320771cfff692730d1066f95da2bb2bdb1e Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Mon, 25 Mar 2019 10:01:55 -0400 Subject: [PATCH] DEV: Update Mousetrap to 1.6.3 --- package.json | 2 +- vendor/assets/javascripts/mousetrap.js | 16 +++++++++++++++- yarn.lock | 4 ++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 149959afe6f..7f03ecee152 100644 --- a/package.json +++ b/package.json @@ -9,8 +9,8 @@ "@fortawesome/fontawesome-free": "5.7.2", "ace-builds": "1.4.2", "bootbox": "3.2.0", - "chart.js": "2.7.3", "bootstrap": "v3.4.1", + "chart.js": "2.7.3", "favcount": "https://github.com/chrishunt/favcount", "handlebars": "4.0.12", "highlight.js": "https://github.com/highlightjs/highlight.js", diff --git a/vendor/assets/javascripts/mousetrap.js b/vendor/assets/javascripts/mousetrap.js index 162d5b97db2..0479677e5fa 100644 --- a/vendor/assets/javascripts/mousetrap.js +++ b/vendor/assets/javascripts/mousetrap.js @@ -17,7 +17,7 @@ * Mousetrap is a simple keyboard shortcut library for Javascript with * no external dependencies * - * @version 1.6.2 + * @version 1.6.3 * @url craig.is/killing/mice */ (function(window, document, undefined) { @@ -982,6 +982,20 @@ return false; } + // Events originating from a shadow DOM are re-targetted and `e.target` is the shadow host, + // not the initial event target in the shadow tree. Note that not all events cross the + // shadow boundary. + // For shadow trees with `mode: 'open'`, the initial event target is the first element in + // the event’s composed path. For shadow trees with `mode: 'closed'`, the initial event + // target cannot be obtained. + if ('composedPath' in e && typeof e.composedPath === 'function') { + // For open shadow trees, update `element` so that the following check works. + var initialEventTarget = e.composedPath()[0]; + if (initialEventTarget !== e.target) { + element = initialEventTarget; + } + } + // stop for input, select, and textarea return element.tagName == 'INPUT' || element.tagName == 'SELECT' || element.tagName == 'TEXTAREA' || element.isContentEditable; }; diff --git a/yarn.lock b/yarn.lock index a57ab9d0437..7de8a2ab7a1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1646,8 +1646,8 @@ moment@2.x, moment@^2.10.2: integrity sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg== "mousetrap@https://github.com/discourse/mousetrap#firefox-alt-key": - version "1.6.2" - resolved "https://github.com/discourse/mousetrap#51613787a7cb8be79435f039ba2ba3a43efe797d" + version "1.6.3" + resolved "https://github.com/discourse/mousetrap#0d41aa7b173abfb83a6bec3ad39a6a708bc49108" ms@2.0.0: version "2.0.0"