From 0ddfeb9c647dd4fee57c027b719a5af0e7f88683 Mon Sep 17 00:00:00 2001 From: Joffrey JAFFEUX Date: Mon, 20 May 2019 10:45:31 +0200 Subject: [PATCH] FIX: ensures mousetrap is reset with the application (#7569) --- app/assets/javascripts/discourse.js.es6 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/assets/javascripts/discourse.js.es6 b/app/assets/javascripts/discourse.js.es6 index a05df2f5ae6..3ad77043a0b 100644 --- a/app/assets/javascripts/discourse.js.es6 +++ b/app/assets/javascripts/discourse.js.es6 @@ -1,3 +1,4 @@ +/*global Mousetrap:true*/ import { buildResolver } from "discourse-common/resolver"; import { default as computed, @@ -15,6 +16,12 @@ const Discourse = Ember.Application.extend({ paste: "paste" }, + reset() { + this._super(...arguments); + + Mousetrap.reset(); + }, + getURL(url) { if (!url) return url;