Skip to content

Commit

Permalink
Merge pull request #15320 from ncounter/bugfix-enable-button-on-change
Browse files Browse the repository at this point in the history
Fix event to validate and adapt textarea comment
  • Loading branch information
hennevogel committed Dec 6, 2023
2 parents 1879487 + 6e8200c commit e6a640a
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/api/app/assets/javascripts/webui/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ function validateForm(e) {

$(document).ready(function(){
// Disable submit button if textarea is empty and enable otherwise
$('.comments-list,.comment_new,.timeline,.diff').on('keyup', '.comment-field', function(e) {
$('.comments-list,.comment_new,.timeline,.diff').on('input', '.comment-field', function(e) {
validateForm(e);
});

$('.comments-list,.comment_new,.timeline,.diff').on('keyup click', '.comment-field', function() {
resizeTextarea(this);
});

Expand Down

0 comments on commit e6a640a

Please sign in to comment.