From 5a723bff9177369e9797f885533267e9ffc23886 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 11 Jan 2016 02:59:51 -0800 Subject: [PATCH] Support synthetic submits from stacked actions Summary: Fixes T10116. Test Plan: - Prior to patch: Control/Command + Enter submitted form but ignored actions. - After patch: verifid command + enter submits actions. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10116 Differential Revision: https://secure.phabricator.com/D14991 --- resources/celerity/map.php | 22 +++++++++---------- .../transactions/behavior-comment-actions.js | 3 +-- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 316c926d41..327403c38a 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -426,7 +426,7 @@ return array( 'rsrc/js/application/repository/repository-crossreference.js' => 'e5339c43', 'rsrc/js/application/search/behavior-reorder-queries.js' => 'e9581f08', 'rsrc/js/application/slowvote/behavior-slowvote-embed.js' => '887ad43f', - 'rsrc/js/application/transactions/behavior-comment-actions.js' => 'b65559c0', + 'rsrc/js/application/transactions/behavior-comment-actions.js' => '1f2fcaf8', 'rsrc/js/application/transactions/behavior-reorder-configs.js' => 'd7a74243', 'rsrc/js/application/transactions/behavior-reorder-fields.js' => 'b59e1e96', 'rsrc/js/application/transactions/behavior-show-older-transactions.js' => 'dbbf48b6', @@ -570,7 +570,7 @@ return array( 'javelin-behavior-audit-preview' => 'd835b03a', 'javelin-behavior-bulk-job-reload' => 'edf8a145', 'javelin-behavior-choose-control' => '327a00d1', - 'javelin-behavior-comment-actions' => 'b65559c0', + 'javelin-behavior-comment-actions' => '1f2fcaf8', 'javelin-behavior-config-reorder-fields' => 'b6993408', 'javelin-behavior-conpherence-drag-and-drop-photo' => 'cf86d16a', 'javelin-behavior-conpherence-menu' => '1d45c74d', @@ -969,6 +969,15 @@ return array( 'javelin-dom', 'javelin-reactor-dom', ), + '1f2fcaf8' => array( + 'javelin-behavior', + 'javelin-stratcom', + 'javelin-workflow', + 'javelin-dom', + 'phuix-form-control-view', + 'phuix-icon-view', + 'javelin-behavior-phabricator-gesture', + ), '2035b9cb' => array( 'javelin-behavior', 'javelin-dom', @@ -1740,15 +1749,6 @@ return array( 'javelin-workflow', 'javelin-vector', ), - 'b65559c0' => array( - 'javelin-behavior', - 'javelin-stratcom', - 'javelin-workflow', - 'javelin-dom', - 'phuix-form-control-view', - 'phuix-icon-view', - 'javelin-behavior-phabricator-gesture', - ), 'b6993408' => array( 'javelin-behavior', 'javelin-stratcom', diff --git a/webroot/rsrc/js/application/transactions/behavior-comment-actions.js b/webroot/rsrc/js/application/transactions/behavior-comment-actions.js index e9204772c4..be28e0bdad 100644 --- a/webroot/rsrc/js/application/transactions/behavior-comment-actions.js +++ b/webroot/rsrc/js/application/transactions/behavior-comment-actions.js @@ -156,11 +156,10 @@ JX.behavior('comment-actions', function(config) { } } - JX.DOM.listen(form_node, 'submit', null, function() { + JX.DOM.listen(form_node, ['submit', 'didSyntheticSubmit'], null, function() { input_node.value = serialize_actions(); }); - if (config.showPreview) { var request = new JX.PhabricatorShapedRequest( config.actionURI,