diff --git a/pagure/templates/issue.html b/pagure/templates/issue.html
index 5e6d828..b2a2a2e 100644
--- a/pagure/templates/issue.html
+++ b/pagure/templates/issue.html
@@ -393,7 +393,7 @@ source.addEventListener('message', function(e) {
{% if authenticated and form %}
function try_async_comment(form) {
console.log(form)
- $('body').find('input[type="submit"]').attr("disabled", "disabled");
+ $(form).find('input[type="submit"]').attr("disabled", "disabled");
var _data = $(form).serialize();
var btn = $(document.activeElement);
if (btn[0].name == 'drop_comment'){
@@ -426,7 +426,7 @@ function try_async_comment(form) {
$(form).off('submit');
form.submit();
})
- $('body').find('input[type="submit"]').removeAttr("disabled");
+ $(form).find('input[type="submit"]').removeAttr("disabled");
return false;
};
{% endif %}