Fix not working disable when only spaces in textarea

This commit is contained in:
Alexei Koshelev 2022-11-10 17:05:51 +03:00
parent a1ff76f18f
commit 4139b9b4a6
3 changed files with 4 additions and 4 deletions

View file

@ -346,7 +346,7 @@ define([
disableTextBoxButton: function(textboxEl) {
var button = $(textboxEl.siblings('#chat-msg-btn-add')[0]);
if(textboxEl.val().length > 0) {
if(textboxEl.val().trim().length > 0) {
button.removeAttr('disabled');
button.removeClass('disabled');
} else {

View file

@ -101,7 +101,7 @@ define([
disableTextBoxButton: function(textboxEl) {
var button = $(textboxEl.siblings('#id-comments-change')[0]);
if(textboxEl.val().length > 0) {
if(textboxEl.val().trime().length > 0) {
button.removeAttr('disabled');
button.removeClass('disabled');
} else {
@ -714,7 +714,7 @@ define([
disableTextBoxButton: function(textboxEl) {
var button = $(textboxEl.parent().siblings('.add')[0]);
if(textboxEl.val().length > 0) {
if(textboxEl.val().trim().length > 0) {
button.removeAttr('disabled');
button.removeClass('disabled');
} else {

View file

@ -176,7 +176,7 @@ define([
disableTextBoxButton: function(textboxEl) {
var button = $(textboxEl.siblings('#id-comments-change-popover')[0]);
if(textboxEl.val().length > 0) {
if(textboxEl.val().trim().length > 0) {
button.removeAttr('disabled');
button.removeClass('disabled');
} else {