We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0261995 commit 4335952Copy full SHA for 4335952
1 file changed
code_comments/htdocs/code-comments.js
@@ -168,7 +168,10 @@ var underscore = _.noConflict();
168
render: function() {
169
this.$el.html(this.template({formatting_help_url: CodeComments.formatting_help_url}))
170
.dialog({ autoOpen: false, title: 'Add Comment', close: this.close, modal: true });
171
- // Prevent keypresses in the dialog from being intercepted by other scripts
+ // As the textarea in our dialog is created after Trac's
172
+ // keyboard_nav.js has bound, we have to stop keydown events
173
+ // propoagating in order to avoid unexpected navigation while the
174
+ // user is typing their comment.
175
this.$el.keydown(function(e) {
176
event.stopPropagation();
177
});
0 commit comments