MDL-57270 core_message: trim message before it is sent
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
@@ -393,10 +393,10 @@ define(['jquery', 'core/ajax', 'core/templates', 'core/notification', 'core/cust
|
||||
*/
|
||||
Messages.prototype._sendMessage = function() {
|
||||
var element = this.messageArea.find(SELECTORS.SENDMESSAGETEXT);
|
||||
var text = element.val();
|
||||
var text = element.val().trim();
|
||||
|
||||
// Do not do anything if it is empty.
|
||||
if (text.trim() === '') {
|
||||
if (text === '') {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user