1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

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:
epriestley 2015-03-16 06:44:07 -07:00
parent cc7a9660b6
commit cf54194ef5
2 changed files with 16 additions and 12 deletions

View file

@ -353,7 +353,7 @@ return array(
'rsrc/js/application/auth/behavior-persona-login.js' => '9414ff18',
'rsrc/js/application/config/behavior-reorder-fields.js' => '14a827de',
'rsrc/js/application/conpherence/ConpherenceThreadManager.js' => 'cff1902b',
'rsrc/js/application/conpherence/behavior-durable-column.js' => '332ac18d',
'rsrc/js/application/conpherence/behavior-durable-column.js' => 'e975bd12',
'rsrc/js/application/conpherence/behavior-menu.js' => 'c4151295',
'rsrc/js/application/conpherence/behavior-pontificate.js' => '21ba5861',
'rsrc/js/application/conpherence/behavior-quicksand-blacklist.js' => '7927a7d3',
@ -583,7 +583,7 @@ return array(
'javelin-behavior-diffusion-locate-file' => '6d3e1947',
'javelin-behavior-diffusion-pull-lastmodified' => '2b228192',
'javelin-behavior-doorkeeper-tag' => 'e5822781',
'javelin-behavior-durable-column' => '332ac18d',
'javelin-behavior-durable-column' => 'e975bd12',
'javelin-behavior-error-log' => '6882e80a',
'javelin-behavior-fancy-datepicker' => 'c51ae228',
'javelin-behavior-global-drag-and-drop' => 'bbdf75ca',
@ -1054,16 +1054,6 @@ return array(
'331b1611' => array(
'javelin-install',
),
'332ac18d' => array(
'javelin-behavior',
'javelin-dom',
'javelin-stratcom',
'javelin-behavior-device',
'javelin-scrollbar',
'javelin-quicksand',
'phabricator-keyboard-shortcut',
'conpherence-thread-manager',
),
'3ab51e2c' => array(
'javelin-behavior',
'javelin-behavior-device',
@ -1903,6 +1893,16 @@ return array(
'javelin-dom',
'phabricator-draggable-list',
),
'e975bd12' => array(
'javelin-behavior',
'javelin-dom',
'javelin-stratcom',
'javelin-behavior-device',
'javelin-scrollbar',
'javelin-quicksand',
'phabricator-keyboard-shortcut',
'conpherence-thread-manager',
),
'ea681761' => array(
'javelin-behavior',
'javelin-aphlict',

View file

@ -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.