We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2232c13 commit 22f9ac8Copy full SHA for 22f9ac8
client/views/dialogs/base.js
@@ -37,9 +37,11 @@ define([
37
this.$el.addClass(this.options.className);
38
39
this.value = null;
40
+ this.keydownHandler = _.bind(this.keydown, this)
41
42
+ // Bind keyboard
43
if (this.options.keyboard) {
- $(document).keydown(_.bind(this.keydown, this));
44
+ $(document).bind("keydown", this.keydownHandler);
45
}
46
47
return this;
@@ -69,6 +71,11 @@ define([
69
71
if (e != null) {
70
72
e.preventDefault();
73
74
+
75
+ // Unbind dowument keydown
76
+ $(document).unbind("keydown", this.keydownHandler);
77
78
+ // Hide modal
79
this.$el.modal('hide');
80
DialogView.current = null;
81
},
0 commit comments