Skip to content

Commit

Permalink
fix(core): make addErrorOnModalField work properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-D committed Mar 3, 2024
1 parent 4dd26c6 commit 0dc57bf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/trumbowyg.js
Original file line number Diff line number Diff line change
Expand Up @@ -1775,13 +1775,11 @@ Object.defineProperty(jQuery.trumbowyg, 'defaultOptions', {
$row = $field.closest('.' + prefix + 'input-row');

$field
.on('change keyup', function () {
.one('change keyup', function () {
$row.removeClass(prefix + 'input-error');
setTimeout(function () {
$row.find('.' + spanErrorClass).remove();
}, 150);
});

$row.find('.' + spanErrorClass).remove();
$row
.addClass(prefix + 'input-error')
.find('.' + prefix + 'input-infos label')
Expand Down

0 comments on commit 0dc57bf

Please sign in to comment.