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:
parent
ef9097b4f4
commit
585c4468c1
1 changed files with 5 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue