1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-24 15:49:44 +02:00

bug fix for double key-binding

This commit is contained in:
Harvey Kandola 2017-04-13 10:57:57 +01:00
parent ef9097b4f4
commit 585c4468c1

View file

@ -48,7 +48,11 @@ export default Ember.Component.extend({
didRender() {
let msContainer = document.getElementById(this.get('containerId'));
let mousetrap = new Mousetrap(msContainer);
let mousetrap = this.get('mousetrap');
if (is.null(mousetrap)) {
mousetrap = new Mousetrap(msContainer);
}
mousetrap.bind('esc', () => {
this.send('onCancel');
@ -68,7 +72,6 @@ export default Ember.Component.extend({
willDestroyElement() {
let drop = this.get('drop');
if (is.not.null(drop)) {
drop.destroy();
}