Skip to content

Disable save button if trimmed draft string is empty

Lukas Möller requested to merge 157-prevent-empty-comments-and-answers into staging

Closes #157 (closed)

.trim(): Removes the leading and trailing white space and line terminator characters from a string.

If the trimmed version is empty the save button is now disabled.

The comment component didn't use the loading param previously, that part (disabled → loading) is unrelated to the issue.

Merge request reports

Loading