Improve chat column behavior for newline in empty text box
Summary: Ref T7538. I got this half correct but not fully correct: when you press enter in an empty text box, do nothing (instead of: sending an empty message, or writing a literal newline). Test Plan: Hit enter in empty chat column box. Reviewers: btrahan, chad Reviewed By: chad Subscribers: epriestley Maniphest Tasks: T7538 Differential Revision: https://secure.phabricator.com/D12089
This commit is contained in:
@@ -296,6 +296,10 @@ JX.behavior('durable-column', function(config, statics) {
|
||||
return;
|
||||
}
|
||||
|
||||
// From here on, interpret this as a "send" action, not a literal
|
||||
// newline.
|
||||
e.kill();
|
||||
|
||||
var textarea = _getColumnTextareaNode();
|
||||
if (!textarea.value.length) {
|
||||
// If there's no text, don't try to submit the form.
|
||||
|
||||
Reference in New Issue
Block a user