From 8554168f97c76f5e4e256dbe6913d1085422e3a5 Mon Sep 17 00:00:00 2001 From: Scott Wittenburg Date: Tue, 5 Jan 2021 20:46:02 -0700 Subject: [PATCH] Work around mousetrap listener leak --- client/package-lock.json | 5 ++--- client/package.json | 2 +- client/src/vue-utilities/v-mousetrap/index.js | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/client/package-lock.json b/client/package-lock.json index 43f7585..4315062 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -7498,9 +7498,8 @@ "integrity": "sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==" }, "mousetrap": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.5.tgz", - "integrity": "sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==" + "version": "github:scottwittenburg/mousetrap#3f4ba0009f1c5eda9e37177f8da5963739314ccd", + "from": "github:scottwittenburg/mousetrap#fix-listener-leak" }, "move-concurrently": { "version": "1.0.1", diff --git a/client/package.json b/client/package.json index 2663f94..a422364 100644 --- a/client/package.json +++ b/client/package.json @@ -11,7 +11,7 @@ "@girder/components": "git+https://github.com/girder/girder_web_components.git#v2.2.6", "bluebird": "^3.5.5", "itk": "^9.1.1", - "mousetrap": "~1.6.2", + "mousetrap": "scottwittenburg/mousetrap#fix-listener-leak", "vtk.js": "14.16.5", "vue": "^2.6.10", "vue-async-computed": "^3.5.1", diff --git a/client/src/vue-utilities/v-mousetrap/index.js b/client/src/vue-utilities/v-mousetrap/index.js index 8080087..1e11db0 100644 --- a/client/src/vue-utilities/v-mousetrap/index.js +++ b/client/src/vue-utilities/v-mousetrap/index.js @@ -31,7 +31,7 @@ function bind(el, value, bindElement) { } function unbind(el) { - el.mousetrap.reset(); + el.mousetrap.destroy(); } export default function install(Vue) {